Merge "Change related to log4j removal needed in models"
[policy/models.git] / models-interactions / model-actors / actor.guard / src / test / java / org / onap / policy / controlloop / actor / guard / GuardActorServiceProviderTest.java
index f4ab606..0ad8161 100644 (file)
 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;
 import org.junit.Test;
+import org.onap.policy.controlloop.actor.test.BasicActor;
 
-public class GuardActorServiceProviderTest {
+public class GuardActorServiceProviderTest extends BasicActor {
 
     @Test
     public void test() {
         final GuardActorServiceProvider prov = new GuardActorServiceProvider();
 
         // verify that it has the operators we expect
-        var expected = Arrays.asList(GuardOperation.NAME).stream().sorted().collect(Collectors.toList());
+        var expected = Arrays.asList(DecisionOperation.NAME).stream().sorted().collect(Collectors.toList());
         var actual = prov.getOperationNames().stream().sorted().collect(Collectors.toList());
 
         assertEquals(expected.toString(), actual.toString());
+
+        // verify that it all plugs into the ActorService
+        verifyActorService(GuardActorServiceProvider.NAME, "service.yaml");
+
+        assertTrue(prov.getOperator(DecisionOperation.NAME) instanceof DecisionOperator);
     }
 }