params = ControlLoopOperationParams.builder().actorService(actorService).completeCallback(completer)
.context(context).executor(executor).actor(ACTOR).operation(OPERATION).payload(payload)
.retry(RETRY).target(TARGET).targetEntity(TARGET_ENTITY).timeoutSec(TIMEOUT)
- .startCallback(starter).build();
+ .startCallback(starter).preprocessed(true).build();
outcome = params.makeOutcome();
}
assertThatIllegalArgumentException().isThrownBy(() -> params.toBuilder().context(null).build().start());
}
+ @Test
+ public void testBuild() {
+ assertSame(operation, params.build());
+
+ assertThatIllegalArgumentException().isThrownBy(() -> params.toBuilder().context(null).build().build());
+ }
+
@Test
public void testGetRequestId() {
assertSame(REQ_ID, params.getRequestId());
assertNull(ControlLoopOperationParams.builder().build().getPayload());
}
+ @Test
+ public void test() {
+ assertTrue(params.isPreprocessed());
+
+ // should be false when unspecified
+ assertFalse(ControlLoopOperationParams.builder().build().isPreprocessed());
+ }
+
@Test
public void testGetRetry() {
assertSame(RETRY, params.getRetry());