Make Actors event-agnostic
[policy/models.git] / models-interactions / model-actors / actor.cds / src / test / java / org / onap / policy / controlloop / actor / cds / GrpcOperatorTest.java
index 11121c0..3e3b1f5 100644 (file)
@@ -25,16 +25,14 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import static org.junit.Assert.assertEquals;
 
 import java.util.Map;
+import java.util.UUID;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.MockitoAnnotations;
 import org.onap.policy.cds.properties.CdsServerProperties;
-import org.onap.policy.controlloop.VirtualControlLoopEvent;
 import org.onap.policy.controlloop.actor.cds.constants.CdsActorConstants;
 import org.onap.policy.controlloop.actorserviceprovider.Operation;
-import org.onap.policy.controlloop.actorserviceprovider.TargetType;
 import org.onap.policy.controlloop.actorserviceprovider.Util;
-import org.onap.policy.controlloop.actorserviceprovider.controlloop.ControlLoopEventContext;
 import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams;
 import org.onap.policy.controlloop.actorserviceprovider.parameters.ParameterValidationRuntimeException;
 
@@ -85,10 +83,8 @@ public class GrpcOperatorTest {
 
     @Test
     public void testBuildOperation() {
-        VirtualControlLoopEvent event = new VirtualControlLoopEvent();
-        ControlLoopEventContext context = new ControlLoopEventContext(event);
         ControlLoopOperationParams params = ControlLoopOperationParams.builder().actor(CdsActorConstants.CDS_ACTOR)
-                        .operation(GrpcOperation.NAME).context(context).targetType(TargetType.VM).build();
+                        .operation(GrpcOperation.NAME).requestId(UUID.randomUUID()).build();
 
         // not configured yet
         assertThatIllegalStateException().isThrownBy(() -> operation.buildOperation(params));