Merge "Sequence throws NPE if task outcome is null"
authorLiam Fallon <liam.fallon@est.tech>
Sun, 1 Mar 2020 14:38:22 +0000 (14:38 +0000)
committerGerrit Code Review <gerrit@onap.org>
Sun, 1 Mar 2020 14:38:22 +0000 (14:38 +0000)
models-interactions/model-actors/actor.guard/src/main/java/org/onap/policy/controlloop/actor/guard/GuardActorServiceProvider.java
models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/GuardActorServiceProviderTest.java

index e37de57..0053213 100644 (file)
@@ -23,7 +23,6 @@
 package org.onap.policy.controlloop.actor.guard;
 
 import org.onap.policy.controlloop.actorserviceprovider.impl.HttpActor;
-import org.onap.policy.controlloop.actorserviceprovider.impl.HttpOperator;
 import org.onap.policy.controlloop.actorserviceprovider.impl.OperationPartial;
 
 public class GuardActorServiceProvider extends HttpActor<GuardActorParams> {
@@ -36,6 +35,6 @@ public class GuardActorServiceProvider extends HttpActor<GuardActorParams> {
     public GuardActorServiceProvider() {
         super(NAME, GuardActorParams.class);
 
-        addOperator(new HttpOperator(NAME, GuardOperation.NAME, GuardOperation::new));
+        addOperator(new GuardOperator(NAME, GuardOperation.NAME, GuardOperation::new));
     }
 }
index bb5d4dd..6721ff7 100644 (file)
@@ -21,6 +21,7 @@
 package org.onap.policy.controlloop.actor.guard;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 import java.util.Arrays;
 import java.util.stream.Collectors;
@@ -41,5 +42,7 @@ public class GuardActorServiceProviderTest extends BasicActor {
 
         // verify that it all plugs into the ActorService
         verifyActorService(GuardActorServiceProvider.NAME, "service.yaml");
+
+        assertTrue(prov.getOperator(GuardOperation.NAME) instanceof GuardOperator);
     }
 }