Delete preprocessed flag from actors 44/115044/4
authorJim Hahn <jrh3@att.com>
Wed, 18 Nov 2020 15:44:41 +0000 (10:44 -0500)
committerJim Hahn <jrh3@att.com>
Fri, 20 Nov 2020 16:49:01 +0000 (11:49 -0500)
Removed the "preprocessed" flag from the Actor parameter class, now
that the actors no longer have a startPreprocess() method.

Also removed targetEntity from Actor parameter class.  Created a
makeOutcome method within OperationPartial, which is used to create an
initial outcome whose target field is pre-populated with the
target-entity extracted from the properties.  As the meaning of "target"
may be specific to an operation, the makeOutcome method may be
overridden by an operation subclass.

Issue-ID: POLICY-2804
Change-Id: Ifb66de63301d644e69340009593513773ee5672d
Signed-off-by: Jim Hahn <jrh3@att.com>
21 files changed:
models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiGetPnfOperation.java
models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiGetTenantOperation.java
models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperationTest.java
models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetPnfOperationTest.java
models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetTenantOperationTest.java
models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/ModifyConfigOperationTest.java
models-interactions/model-actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperation.java
models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperationTest.java
models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/GrpcOperationTest.java
models-interactions/model-actors/actor.guard/src/main/java/org/onap/policy/controlloop/actor/guard/DecisionOperation.java
models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/BandwidthOnDemandOperationTest.java
models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/RerouteOperationTest.java
models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleCreateTest.java
models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleDeleteTest.java
models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicOperation.java
models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicOperationTest.java
models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/RestartTest.java
models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/OperationPartial.java
models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/parameters/ControlLoopOperationParams.java
models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/OperationPartialTest.java
models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/parameters/ControlLoopOperationParamsTest.java

index a4b3065..c1582c5 100644 (file)
@@ -30,6 +30,7 @@ import org.onap.policy.aai.AaiConstants;
 import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
 import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
 import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
+import org.onap.policy.controlloop.actorserviceprovider.OperationProperties;
 import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams;
 import org.onap.policy.controlloop.actorserviceprovider.parameters.HttpConfig;
 
@@ -71,7 +72,8 @@ public class AaiGetPnfOperation extends AaiGetOperation {
 
         StringBuilder str = new StringBuilder(getClient().getBaseUrl());
 
-        String path = getPath() + URI_SEP + URLEncoder.encode(getTargetEntity(), StandardCharsets.UTF_8);
+        String target = getProperty(OperationProperties.AAI_TARGET_ENTITY);
+        String path = getPath() + URI_SEP + URLEncoder.encode(target, StandardCharsets.UTF_8);
         WebTarget web = getClient().getWebTarget().path(path);
         str.append(path);
 
index add9c64..b3bf4ce 100644 (file)
@@ -28,6 +28,7 @@ import org.onap.policy.aai.AaiConstants;
 import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
 import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
 import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
+import org.onap.policy.controlloop.actorserviceprovider.OperationProperties;
 import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams;
 import org.onap.policy.controlloop.actorserviceprovider.parameters.HttpConfig;
 
@@ -72,8 +73,10 @@ public class AaiGetTenantOperation extends AaiGetOperation {
         WebTarget web = getClient().getWebTarget().path(path);
         str.append(path);
 
+        String target = getProperty(OperationProperties.AAI_TARGET_ENTITY);
+
         web = addQuery(web, str, "?", "search-node-type", "vserver");
-        web = addQuery(web, str, "&", "filter", "vserver-name:EQUALS:" + getTargetEntity());
+        web = addQuery(web, str, "&", "filter", "vserver-name:EQUALS:" + target);
 
         Builder webldr = web.request();
         addHeaders(webldr, headers);
index 61155ce..b5ba5d2 100644 (file)
@@ -91,7 +91,7 @@ public class AaiCustomQueryOperationTest extends BasicAaiOperation {
         HttpParams opParams = HttpParams.builder().clientName(MY_CLIENT).path("v16/query").build();
         config = new HttpConfig(blockingExecutor, opParams, HttpClientFactoryInstance.getClientFactory());
 
-        params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor).preprocessed(true).build();
+        params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor).build();
         oper = new AaiCustomQueryOperation(params, config);
 
         oper.setProperty(OperationProperties.AAI_VSERVER_LINK, MY_LINK);
index fb2b770..9e72fe2 100644 (file)
@@ -72,6 +72,7 @@ public class AaiGetPnfOperationTest extends BasicAaiOperation {
     public void setUp() throws Exception {
         super.setUpBasic();
         oper = new AaiGetPnfOperation(params, config);
+        oper.setProperty(OperationProperties.AAI_TARGET_ENTITY, TARGET_ENTITY);
     }
 
     @Test
index 27495d8..a79a8f7 100644 (file)
@@ -72,6 +72,7 @@ public class AaiGetTenantOperationTest extends BasicAaiOperation {
     public void setUp() throws Exception {
         super.setUpBasic();
         oper = new AaiGetTenantOperation(params, config);
+        oper.setProperty(OperationProperties.AAI_TARGET_ENTITY, TARGET_ENTITY);
     }
 
     @Test
index ee3ac02..ab15fdd 100644 (file)
@@ -82,7 +82,7 @@ public class ModifyConfigOperationTest extends BasicAppcOperation {
                         BidirectionalTopicParams.builder().sinkTopic(MY_SINK).sourceTopic(MY_SINK).build();
         config = new BidirectionalTopicConfig(blockingExecutor, opParams, topicMgr, AppcOperation.SELECTOR_KEYS);
 
-        params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor).preprocessed(true).build();
+        params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor).build();
 
         oper = new ModifyConfigOperation(params, config);
 
index 303067d..bf20478 100644 (file)
@@ -84,7 +84,8 @@ public class AppcLcmOperation extends BidirectionalTopicOperation<AppcLcmDmaapWr
          * Action Identifiers are required for APPC LCM requests. For R1, the recipes
          * supported by Policy only require a vnf-id.
          */
-        inputRequest.setActionIdentifiers(Map.of(VNF_ID_KEY, getTargetEntity()));
+        String target = getProperty(OperationProperties.AAI_TARGET_ENTITY);
+        inputRequest.setActionIdentifiers(Map.of(VNF_ID_KEY, target));
 
         /*
          * For R1, the payloads will not be required for the Restart, Rebuild, or Migrate
index 650c5da..b9999f4 100644 (file)
@@ -22,6 +22,7 @@ package org.onap.policy.controlloop.actor.appclcm;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
@@ -94,6 +95,7 @@ public class AppcLcmOperationTest extends BasicBidirectionalTopicOperation<AppcL
         response = makeResponse();
 
         oper = new AppcLcmOperation(params, config);
+        oper.setProperty(OperationProperties.AAI_TARGET_ENTITY, TARGET_ENTITY);
     }
 
     @After
@@ -118,6 +120,7 @@ public class AppcLcmOperationTest extends BasicBidirectionalTopicOperation<AppcL
         params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor).build();
 
         oper = new AppcLcmOperation(params, config);
+        oper.setProperty(OperationProperties.AAI_TARGET_ENTITY, TARGET_ENTITY);
 
         outcome = oper.start().get();
         assertEquals(OperationResult.SUCCESS, outcome.getResult());
@@ -161,6 +164,7 @@ public class AppcLcmOperationTest extends BasicBidirectionalTopicOperation<AppcL
         // only builds a payload for ConfigModify
         params = params.toBuilder().operation(AppcLcmConstants.OPERATION_CONFIG_MODIFY).build();
         oper = new AppcLcmOperation(params, config);
+        oper.setProperty(OperationProperties.AAI_TARGET_ENTITY, TARGET_ENTITY);
 
         oper.generateSubRequestId(2);
         AppcLcmDmaapWrapper req = oper.makeRequest(2);
@@ -181,8 +185,7 @@ public class AppcLcmOperationTest extends BasicBidirectionalTopicOperation<AppcL
 
         oper.generateSubRequestId(2);
 
-        assertThatIllegalArgumentException().isThrownBy(() -> oper.makeRequest(2))
-                        .withMessage("Cannot convert payload");
+        assertThatThrownBy(() -> oper.makeRequest(2)).isInstanceOf(NullPointerException.class);
     }
 
     @Test
index da069d8..f83f782 100644 (file)
@@ -64,7 +64,6 @@ import org.onap.policy.simulators.CdsSimulator;
 import org.onap.policy.simulators.Util;
 
 public class GrpcOperationTest {
-    private static final String TARGET_ENTITY = "entity";
     private static final String MY_VNF = "my-vnf";
     private static final String MY_SVC_ID = "my-service-instance-id";
     private static final String RESOURCE_ID = "my-resource-id";
@@ -125,7 +124,7 @@ public class GrpcOperationTest {
         targetEntityIds.put(ControlLoopOperationParams.PARAMS_ENTITY_RESOURCEID, RESOURCE_ID);
 
         params = ControlLoopOperationParams.builder().actor(CdsActorConstants.CDS_ACTOR).operation(GrpcOperation.NAME)
-                        .requestId(REQUEST_ID).actorService(new ActorService()).targetEntity(TARGET_ENTITY)
+                        .requestId(REQUEST_ID).actorService(new ActorService())
                         .build();
     }
 
@@ -137,9 +136,9 @@ public class GrpcOperationTest {
         Map<String, Object> payload = Map.of("artifact_name", "my_artifact", "artifact_version", "1.0");
 
         params = ControlLoopOperationParams.builder().actor(CdsActorConstants.CDS_ACTOR).operation("subscribe")
-                        .requestId(REQUEST_ID).actorService(new ActorService()).targetEntity(TARGET_ENTITY)
+                        .requestId(REQUEST_ID).actorService(new ActorService())
                         .retry(0).timeoutSec(5).executor(blockingExecutor).payload(payload)
-                        .preprocessed(true).build();
+                        .build();
 
         cdsProps.setHost("localhost");
         cdsProps.setPort(sim.getPort());
@@ -231,7 +230,7 @@ public class GrpcOperationTest {
 
         ControlLoopOperationParams params = ControlLoopOperationParams.builder().actor(CdsActorConstants.CDS_ACTOR)
                         .operation(GrpcOperation.NAME).requestId(REQUEST_ID).actorService(new ActorService())
-                        .targetType(targetType).targetEntity(TARGET_ENTITY).payload(payloadMap).build();
+                        .targetType(targetType).payload(payloadMap).build();
 
         GrpcConfig config = new GrpcConfig(executor, cdsProps);
         operation = new GrpcOperation(params, config);
index d9ec3ab..f18a04f 100644 (file)
@@ -99,7 +99,7 @@ public class DecisionOperation extends HttpOperation<DecisionResponse> {
         final Executor executor = params.getExecutor();
         final CallbackManager callbacks = new CallbackManager();
 
-        return CompletableFuture.completedFuture(params.makeOutcome(getTargetEntity()))
+        return CompletableFuture.completedFuture(makeOutcome())
                         .whenCompleteAsync(callbackStarted(callbacks), executor)
                         .whenCompleteAsync(callbackCompleted(callbacks), executor);
     }
index ba68534..8c12be8 100644 (file)
@@ -96,7 +96,7 @@ public class BandwidthOnDemandOperationTest extends BasicSdncOperation {
                         .path("GENERIC-RESOURCE-API:vf-module-topology-operation").build();
         config = new HttpConfig(blockingExecutor, opParams, HttpClientFactoryInstance.getClientFactory());
 
-        params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor).preprocessed(true).build();
+        params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor).build();
         oper = new BandwidthOnDemandOperation(params, config);
 
         oper.setProperty(OperationProperties.ENRICHMENT_SERVICE_ID, MY_SERVICE);
index 3f08784..effbb6e 100644 (file)
@@ -75,7 +75,7 @@ public class RerouteOperationTest extends BasicSdncOperation {
                         .path("GENERIC-RESOURCE-API:network-topology-operation").build();
         config = new HttpConfig(blockingExecutor, opParams, HttpClientFactoryInstance.getClientFactory());
 
-        params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor).preprocessed(true).build();
+        params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor).build();
         oper = new RerouteOperation(params, config);
 
         oper.setProperty(OperationProperties.ENRICHMENT_SERVICE_ID, MY_SERVICE);
index 8dca7c8..dfd5c92 100644 (file)
@@ -98,7 +98,7 @@ public class VfModuleCreateTest extends BasicSoOperation {
                         .maxPolls(2).build();
         config = new HttpPollingConfig(blockingExecutor, opParams, HttpClientFactoryInstance.getClientFactory());
 
-        params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor).preprocessed(true).build();
+        params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor).build();
 
         oper = new VfModuleCreate(params, config);
 
index 3bce9b0..ce76201 100644 (file)
@@ -125,7 +125,7 @@ public class VfModuleDeleteTest extends BasicSoOperation {
                         .pollPath("orchestrationRequests/v5/").maxPolls(2).build();
         config = new HttpPollingConfig(blockingExecutor, opParams, HttpClientFactoryInstance.getClientFactory());
 
-        params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor).preprocessed(true).build();
+        params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor).build();
 
         oper = new VfModuleDelete(params, config);
 
index bb7f34b..4bfbe40 100644 (file)
@@ -112,7 +112,7 @@ public class BasicOperation {
      */
     protected void makeContext() {
         params = ControlLoopOperationParams.builder().executor(executor).requestId(REQ_ID).actorService(service)
-                        .actor(actorName).operation(operationName).targetEntity(TARGET_ENTITY).payload(makePayload())
+                        .actor(actorName).operation(operationName).payload(makePayload())
                         .build();
     }
 
index fe06ad5..758acf7 100644 (file)
@@ -74,7 +74,6 @@ public class BasicOperationTest {
         assertEquals(ACTOR, oper.params.getActor());
         assertEquals(OPERATION, oper.params.getOperation());
         assertSame(BasicHttpOperation.REQ_ID, oper.params.getRequestId());
-        assertEquals(BasicHttpOperation.TARGET_ENTITY, oper.params.getTargetEntity());
     }
 
     @Test
index fab7636..75ed8b2 100644 (file)
@@ -81,7 +81,7 @@ public class RestartTest extends BasicVfcOperation {
                         .maxPolls(1).build();
         config = new HttpPollingConfig(blockingExecutor, opParams, HttpClientFactoryInstance.getClientFactory());
 
-        params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor).preprocessed(true).build();
+        params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor).build();
 
         restartOper = new Restart(params, config);
 
index e9f6b02..c3d3f66 100644 (file)
@@ -226,7 +226,7 @@ public abstract class OperationPartial implements Operation {
         logger.info("{}: start operation attempt {} for {}", getFullName(), attempt, params.getRequestId());
 
         final Executor executor = params.getExecutor();
-        final OperationOutcome outcome = params.makeOutcome(getTargetEntity());
+        final OperationOutcome outcome = makeOutcome();
         final CallbackManager callbacks = new CallbackManager();
 
         // this operation attempt gets its own controller
@@ -357,7 +357,7 @@ public abstract class OperationPartial implements Operation {
                 outcome = origOutcome;
             } else {
                 logger.warn("{}: null outcome; treating as a failure for {}", getFullName(), params.getRequestId());
-                outcome = this.setOutcome(params.makeOutcome(getTargetEntity()), OperationResult.FAILURE);
+                outcome = this.setOutcome(makeOutcome(), OperationResult.FAILURE);
             }
 
             // ensure correct actor/operation
@@ -456,7 +456,7 @@ public abstract class OperationPartial implements Operation {
     private Function<Throwable, OperationOutcome> fromException(String type) {
 
         return thrown -> {
-            OperationOutcome outcome = params.makeOutcome(getTargetEntity());
+            OperationOutcome outcome = makeOutcome();
 
             if (thrown instanceof CancellationException || thrown.getCause() instanceof CancellationException) {
                 // do not include exception in the message, as it just clutters the log
@@ -892,6 +892,16 @@ public abstract class OperationPartial implements Operation {
         return operation;
     }
 
+    /**
+     * Makes an outcome, populating the "target" field with the contents of the target
+     * entity property.
+     *
+     * @return a new operation outcome
+     */
+    protected OperationOutcome makeOutcome() {
+        return params.makeOutcome(getProperty(OperationProperties.AAI_TARGET_ENTITY));
+    }
+
     /**
      * Determines if a throwable is due to a timeout.
      *
@@ -975,16 +985,6 @@ public abstract class OperationPartial implements Operation {
         return DEFAULT_RETRY_WAIT_MS;
     }
 
-    /**
-     * Gets the target entity, first trying the properties and then the parameters.
-     *
-     * @return the target entity
-     */
-    protected String getTargetEntity() {
-        String targetEntity = getProperty(OperationProperties.AAI_TARGET_ENTITY);
-        return (targetEntity != null ? targetEntity : params.getTargetEntity());
-    }
-
     /**
      * Gets the operation timeout.
      *
index 67f6803..2769697 100644 (file)
@@ -96,13 +96,6 @@ public class ControlLoopOperationParams {
      */
     private Map<String, Object> payload;
 
-    /**
-     * {@code True} if the preprocessing steps have already been executed, {@code false}
-     * otherwise.
-     */
-    // TODO remove this once the rules no longer reference it
-    private boolean preprocessed;
-
     /**
      * Number of retries allowed, or {@code null} if no retries.
      */
@@ -120,12 +113,6 @@ public class ControlLoopOperationParams {
      */
     private Map<String, String> targetEntityIds;
 
-    /**
-     * Target entity.
-     */
-    // TODO to be removed
-    private String targetEntity;
-
     /**
      * Timeout, in seconds, or {@code null} if no timeout. Zero and negative values also
      * imply no timeout.
@@ -197,9 +184,8 @@ public class ControlLoopOperationParams {
      *
      * @return a new operation outcome
      */
-    // TODO to be removed
     public OperationOutcome makeOutcome() {
-        return makeOutcome(getTargetEntity());
+        return makeOutcome(null);
     }
 
     /**
index b7a6a1d..72a7338 100644 (file)
@@ -165,7 +165,7 @@ public class OperationPartialTest {
 
         params = ControlLoopOperationParams.builder().completeCallback(this::completer).requestId(REQ_ID)
                         .executor(executor).actorService(service).actor(ACTOR).operation(OPERATION).timeoutSec(TIMEOUT)
-                        .startCallback(this::starter).targetEntity(MY_TARGET_ENTITY).build();
+                        .startCallback(this::starter).build();
 
         when(service.getActor(OperationPartial.GUARD_ACTOR_NAME)).thenReturn(guardActor);
         when(guardActor.getOperator(OperationPartial.GUARD_OPERATION_NAME)).thenReturn(guardOperator);
@@ -923,6 +923,12 @@ public class OperationPartialTest {
         }
     }
 
+    @Test
+    public void testMakeOutcome() {
+        oper.setProperty(OperationProperties.AAI_TARGET_ENTITY, MY_TARGET_ENTITY);
+        assertEquals(MY_TARGET_ENTITY, oper.makeOutcome().getTarget());
+    }
+
     @Test
     public void testIsTimeout() {
         final TimeoutException timex = new TimeoutException(EXPECTED_EXCEPTION);
@@ -1006,16 +1012,6 @@ public class OperationPartialTest {
         assertEquals(OperationPartial.DEFAULT_RETRY_WAIT_MS, oper2.getRetryWaitMs());
     }
 
-    @Test
-    public void testGetTargetEntity() {
-        // get it from the params
-        assertEquals(MY_TARGET_ENTITY, oper.getTargetEntity());
-
-        // now get it from the properties
-        oper.setProperty(OperationProperties.AAI_TARGET_ENTITY, "entityX");
-        assertEquals("entityX", oper.getTargetEntity());
-    }
-
     @Test
     public void testGetTimeOutMs() {
         assertEquals(TIMEOUT * 1000, oper.getTimeoutMs(params.getTimeoutSec()));
index b6bd50c..fc36c12 100644 (file)
@@ -112,8 +112,8 @@ public class ControlLoopOperationParamsTest {
 
         params = ControlLoopOperationParams.builder().actorService(actorService).completeCallback(completer)
                         .requestId(REQ_ID).executor(executor).actor(ACTOR).operation(OPERATION).payload(payload)
-                        .retry(RETRY).targetEntity(TARGET_ENTITY).timeoutSec(TIMEOUT)
-                        .startCallback(starter).preprocessed(true).build();
+                        .retry(RETRY).timeoutSec(TIMEOUT)
+                        .startCallback(starter).build();
 
         outcome = params.makeOutcome(TARGET_ENTITY);
     }
@@ -139,13 +139,20 @@ public class ControlLoopOperationParamsTest {
 
     @Test
     public void testMakeOutcome() {
-        assertEquals(ACTOR, outcome.getActor());
-        assertEquals(OPERATION, outcome.getOperation());
+        outcome = params.makeOutcome();
+        assertNull(outcome.getTarget());
+        checkRemainingFields("with actor");
+    }
+
+    @Test
+    public void testMakeOutcomeString() {
+        assertEquals(TARGET_ENTITY, outcome.getTarget());
         checkRemainingFields("with actor");
     }
 
     protected void checkRemainingFields(String testName) {
-        assertEquals(testName, TARGET_ENTITY, outcome.getTarget());
+        assertEquals(ACTOR, outcome.getActor());
+        assertEquals(OPERATION, outcome.getOperation());
         assertNull(testName, outcome.getStart());
         assertNull(testName, outcome.getEnd());
         assertNull(testName, outcome.getSubRequestId());
@@ -212,7 +219,7 @@ public class ControlLoopOperationParamsTest {
         testValidate("requestId", NULL_MSG, bldr -> bldr.requestId(null));
 
         // has no target entity
-        BeanValidationResult result = params.toBuilder().targetEntity(null).build().validate();
+        BeanValidationResult result = params.toBuilder().build().validate();
         assertTrue(result.isValid());
 
         // check edge cases
@@ -224,7 +231,7 @@ public class ControlLoopOperationParamsTest {
 
         // test with minimal fields
         assertTrue(ControlLoopOperationParams.builder().actorService(actorService).requestId(REQ_ID).actor(ACTOR)
-                        .operation(OPERATION).targetEntity(TARGET_ENTITY).build().validate().isValid());
+                        .operation(OPERATION).build().validate().isValid());
     }
 
     private void testValidate(String fieldName, String expected,
@@ -276,14 +283,6 @@ public class ControlLoopOperationParamsTest {
         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());
@@ -312,9 +311,4 @@ public class ControlLoopOperationParamsTest {
     public void testGetCompleteCallback() {
         assertSame(completer, params.getCompleteCallback());
     }
-
-    @Test
-    public void testGetTargetEntity() {
-        assertEquals(TARGET_ENTITY, params.getTargetEntity());
-    }
 }