wrongIterable(SigAddTaskToProject command) {
@Assign
SigSetProjectOwner wrongThrowable(SigCreateProject command) throws RuntimeException {
- throw newIllegalStateException("Command assignee " +
- "has declared an illegal exception.");
+ throw newIllegalStateException("Command assignee has declared an illegal exception.");
}
}
diff --git a/server/src/test/java/io/spine/server/command/model/given/handler/ProcessManagerDoingNothing.java b/server/src/test/java/io/spine/server/command/model/given/handler/ProcessManagerDoingNothing.java
index c92e8c223d4..5c853024936 100644
--- a/server/src/test/java/io/spine/server/command/model/given/handler/ProcessManagerDoingNothing.java
+++ b/server/src/test/java/io/spine/server/command/model/given/handler/ProcessManagerDoingNothing.java
@@ -29,7 +29,6 @@
import com.google.common.collect.ImmutableList;
import io.spine.base.EventMessage;
import io.spine.server.command.Assign;
-import io.spine.server.model.Nothing;
import io.spine.server.procman.ProcessManager;
import io.spine.server.test.shared.EmptyProcess;
import io.spine.test.reflect.command.RefCreateProject;
@@ -37,7 +36,8 @@
import java.util.List;
/**
- * A simple process manager that accepts a command and always returns {@link Nothing}.
+ * A simple process manager that accepts a command and always
+ * returns {@link io.spine.server.event.NoReaction}.
*
* The process manager does not modify its state when “handling” the passed command.
*/
@@ -50,6 +50,6 @@ public ProcessManagerDoingNothing(String id) {
@Assign
List handle(RefCreateProject cmd) {
- return ImmutableList.of(nothing());
+ return ImmutableList.of(noReaction());
}
}
diff --git a/server/src/test/java/io/spine/server/command/model/given/reaction/InvalidCommander.java b/server/src/test/java/io/spine/server/command/model/given/reaction/InvalidCommander.java
index 4c8aef5bd53..f22b31a4a34 100644
--- a/server/src/test/java/io/spine/server/command/model/given/reaction/InvalidCommander.java
+++ b/server/src/test/java/io/spine/server/command/model/given/reaction/InvalidCommander.java
@@ -36,8 +36,8 @@
import io.spine.model.contexts.projects.rejection.SigCannotCreateProject;
import io.spine.server.command.AbstractCommander;
import io.spine.server.command.Command;
+import io.spine.server.event.NoReaction;
import io.spine.server.event.React;
-import io.spine.server.model.Nothing;
import io.spine.server.model.given.SignatureTestEvent;
import java.io.IOException;
@@ -67,12 +67,12 @@ SigStartTask nonMessageParam(int event) {
}
@Command
- SigStartTask threeParams(SigTaskAddedToProject event, EventContext ctx, Nothing third) {
+ SigStartTask threeParams(SigTaskAddedToProject event, EventContext ctx, NoReaction third) {
return EventMessages.startTask();
}
@Command
- SigStartTask wrongSecondParam(SigTaskAddedToProject event, Nothing message) {
+ SigStartTask wrongSecondParam(SigTaskAddedToProject event, NoReaction message) {
return EventMessages.startTask();
}
diff --git a/server/src/test/java/io/spine/server/command/model/given/reaction/ReEitherWithNothing.java b/server/src/test/java/io/spine/server/command/model/given/reaction/ReEitherWithNothing.java
index f5927490f3d..879f7d9ea42 100644
--- a/server/src/test/java/io/spine/server/command/model/given/reaction/ReEitherWithNothing.java
+++ b/server/src/test/java/io/spine/server/command/model/given/reaction/ReEitherWithNothing.java
@@ -27,7 +27,7 @@
package io.spine.server.command.model.given.reaction;
import io.spine.server.command.Command;
-import io.spine.server.model.DoNothing;
+import io.spine.server.command.DoNothing;
import io.spine.server.tuple.EitherOf3;
import io.spine.test.command.CmdAddTask;
import io.spine.test.command.CmdStartTask;
diff --git a/server/src/test/java/io/spine/server/command/model/given/reaction/ValidCommander.java b/server/src/test/java/io/spine/server/command/model/given/reaction/ValidCommander.java
index fd87cc55a63..3e782ae43f4 100644
--- a/server/src/test/java/io/spine/server/command/model/given/reaction/ValidCommander.java
+++ b/server/src/test/java/io/spine/server/command/model/given/reaction/ValidCommander.java
@@ -39,7 +39,7 @@
import io.spine.model.contexts.projects.rejection.ProjectRejections;
import io.spine.server.command.AbstractCommander;
import io.spine.server.command.Command;
-import io.spine.server.model.DoNothing;
+import io.spine.server.command.DoNothing;
import io.spine.server.tuple.EitherOf3;
import io.spine.server.tuple.Pair;
diff --git a/server/src/test/java/io/spine/server/entity/given/tx/TxProcessManager.java b/server/src/test/java/io/spine/server/entity/given/tx/TxProcessManager.java
index ce7aa79f331..7244b920616 100644
--- a/server/src/test/java/io/spine/server/entity/given/tx/TxProcessManager.java
+++ b/server/src/test/java/io/spine/server/entity/given/tx/TxProcessManager.java
@@ -31,8 +31,8 @@
import io.spine.server.entity.given.tx.event.TxCreated;
import io.spine.server.entity.given.tx.event.TxErrorRequested;
import io.spine.server.entity.given.tx.event.TxStateErrorRequested;
+import io.spine.server.event.NoReaction;
import io.spine.server.event.React;
-import io.spine.server.model.Nothing;
import io.spine.server.procman.ProcessManager;
import java.util.List;
@@ -51,11 +51,11 @@ public TxProcessManager(Id id) {
}
@React
- Nothing event(TxCreated e) {
+ NoReaction event(TxCreated e) {
receivedEvents.add(e);
builder().setId(id())
.setName(e.getName());
- return nothing();
+ return noReaction();
}
/**
@@ -65,16 +65,16 @@ Nothing event(TxCreated e) {
* @see io.spine.server.procman.PmTransactionTest#failingInHandler()
*/
@React
- Nothing event(TxErrorRequested e) {
+ NoReaction event(TxErrorRequested e) {
throw new RuntimeException("that tests the tx behaviour for process manager");
}
@React
- Nothing event(TxStateErrorRequested e) {
- // By convention the first field of state is required.
+ NoReaction event(TxStateErrorRequested e) {
+ // By convention, the first field of state is required.
// Clearing it should fail the validation when the transaction is committed.
builder().clearId();
- return nothing();
+ return noReaction();
}
public List receivedEvents() {
diff --git a/server/src/test/java/io/spine/server/event/given/InvalidReactor.java b/server/src/test/java/io/spine/server/event/given/InvalidReactor.java
index 4ab4e1505e5..8cff0464bb7 100644
--- a/server/src/test/java/io/spine/server/event/given/InvalidReactor.java
+++ b/server/src/test/java/io/spine/server/event/given/InvalidReactor.java
@@ -39,8 +39,8 @@
import io.spine.model.contexts.projects.rejection.ProjectRejections;
import io.spine.model.contexts.projects.rejection.SigCannotCreateProject;
import io.spine.server.event.AbstractEventReactor;
+import io.spine.server.event.NoReaction;
import io.spine.server.event.React;
-import io.spine.server.model.Nothing;
import io.spine.server.model.given.SignatureTestEvent;
import java.io.IOException;
@@ -74,7 +74,7 @@ SigTaskStarted nonMessageParam(int event) {
}
@React
- SigTaskStarted wrongThreeParams(SigTaskAddedToProject e, EventContext ctx, Nothing third) {
+ SigTaskStarted wrongThreeParams(SigTaskAddedToProject e, EventContext ctx, NoReaction third) {
return taskStarted();
}
@@ -87,7 +87,7 @@ SigProjectCreated rejectionAndThreeMoreParams(ProjectRejections.SigCannotCreateP
}
@React
- SigTaskStarted wrongSecondParam(SigTaskAddedToProject event, Nothing message) {
+ SigTaskStarted wrongSecondParam(SigTaskAddedToProject event, NoReaction message) {
return taskStarted();
}
diff --git a/server/src/test/java/io/spine/server/event/given/ValidReactor.java b/server/src/test/java/io/spine/server/event/given/ValidReactor.java
index ca36fec7634..fd50e0f0e1d 100644
--- a/server/src/test/java/io/spine/server/event/given/ValidReactor.java
+++ b/server/src/test/java/io/spine/server/event/given/ValidReactor.java
@@ -39,8 +39,8 @@
import io.spine.model.contexts.projects.event.SigTaskStopped;
import io.spine.model.contexts.projects.rejection.ProjectRejections;
import io.spine.server.event.AbstractEventReactor;
+import io.spine.server.event.NoReaction;
import io.spine.server.event.React;
-import io.spine.server.model.Nothing;
import io.spine.server.tuple.EitherOf3;
import io.spine.server.tuple.Pair;
@@ -110,9 +110,9 @@ SigProjectCreated rejectionWithCommandAndCtx(ProjectRejections.SigCannotCreatePr
}
@React
- EitherOf3
+ EitherOf3
eitherOf3Result(SigTaskRemovedFromProject event) {
- return EitherOf3.withC(nothing());
+ return EitherOf3.withC(noReaction());
}
@React
diff --git a/server/src/test/java/io/spine/server/event/model/given/subscriber/InvalidSubscriber.java b/server/src/test/java/io/spine/server/event/model/given/subscriber/InvalidSubscriber.java
index 9e6008e3865..39f67831976 100644
--- a/server/src/test/java/io/spine/server/event/model/given/subscriber/InvalidSubscriber.java
+++ b/server/src/test/java/io/spine/server/event/model/given/subscriber/InvalidSubscriber.java
@@ -37,8 +37,8 @@
import io.spine.model.contexts.projects.rejection.ProjectRejections;
import io.spine.model.contexts.projects.rejection.SigCannotCreateProject;
import io.spine.server.event.AbstractEventSubscriber;
+import io.spine.server.event.NoReaction;
import io.spine.server.event.React;
-import io.spine.server.model.Nothing;
import io.spine.server.model.given.SignatureTestEvent;
import java.io.IOException;
@@ -71,7 +71,7 @@ void nonMessageParam(int event) {
}
@Subscribe
- void wrongThreeParams(SigTaskAddedToProject event, EventContext ctx, Nothing third) {
+ void wrongThreeParams(SigTaskAddedToProject event, EventContext ctx, NoReaction third) {
// do nothing.
}
@@ -84,7 +84,7 @@ void rejectionAndThreeMoreParams(ProjectRejections.SigCannotCreateProject reject
}
@Subscribe
- void wrongSecondParam(SigTaskAddedToProject event, Nothing message) {
+ void wrongSecondParam(SigTaskAddedToProject event, NoReaction message) {
// do nothing.
}
diff --git a/server/src/test/java/io/spine/server/model/TypeMatcherTest.java b/server/src/test/java/io/spine/server/model/TypeMatcherTest.java
index 4f0c57e5217..fbfc8f54dab 100644
--- a/server/src/test/java/io/spine/server/model/TypeMatcherTest.java
+++ b/server/src/test/java/io/spine/server/model/TypeMatcherTest.java
@@ -32,6 +32,8 @@
import io.spine.base.CommandMessage;
import io.spine.base.EventMessage;
import io.spine.core.UserId;
+import io.spine.server.event.NoReaction;
+import io.spine.server.command.DoNothing;
import io.spine.server.tuple.Pair;
import io.spine.server.tuple.Triplet;
import org.junit.jupiter.api.DisplayName;
@@ -47,8 +49,10 @@
import static io.spine.server.model.TypeMatcher.matches;
@DisplayName("`TypeMatcher` should")
-@SuppressWarnings({"SerializableNonStaticInnerClassWithoutSerialVersionUID",
- "SerializableInnerClassWithNonSerializableOuterClass"}) // using anonymous `TypeToken`s.
+@SuppressWarnings({
+ "SerializableNonStaticInnerClassWithoutSerialVersionUID",
+ "SerializableInnerClassWithNonSerializableOuterClass" /* using anonymous `TypeToken`s. */
+})
class TypeMatcherTest {
@Test
@@ -74,7 +78,7 @@ void matchSameTypes() {
"another one being neither a subclass nor of the same type")
void notMatchDifferentTypes() {
assertThat(matches(TypeToken.of(UserId.class),
- TypeToken.of(Nothing.class))
+ TypeToken.of(NoReaction.class))
).isFalse();
assertThat(matches(new TypeToken>() {},
@@ -119,7 +123,7 @@ void doNotMatchSubtypesWithDifferentGenerics() {
void matchGenericByGeneric() {
assertThat(matches(new TypeToken