import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.verify;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;
+import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
+import org.onap.policy.common.endpoints.http.client.HttpClientFactoryInstance;
+import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
import org.onap.policy.common.utils.coder.StandardCoder;
import org.onap.policy.controlloop.actor.test.BasicHttpOperation;
import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
import org.onap.policy.sdnc.SdncRequest;
import org.onap.policy.sdnc.SdncResponse;
import org.onap.policy.sdnc.SdncResponseOutput;
+import org.onap.policy.simulators.Util;
import org.powermock.reflect.Whitebox;
/**
super(actor, operation);
}
+ /**
+ * Starts the simulator.
+ */
+ protected static void initBeforeClass() throws Exception {
+ Util.buildSdncSim();
+
+ BusTopicParams clientParams = BusTopicParams.builder().clientName(MY_CLIENT).basePath("restconf/operations/")
+ .hostname("localhost").managed(true).port(Util.SDNCSIM_SERVER_PORT).build();
+ HttpClientFactoryInstance.getClientFactory().build(clientParams);
+ }
+
+ protected static void destroyAfterClass() {
+ HttpClientFactoryInstance.getClientFactory().destroy();
+ HttpServletServerFactoryInstance.getServerFactory().destroy();
+ }
+
/**
* Initializes mocks and sets up.
*/
assertEquals(PolicyResult.SUCCESS, future2.get().getResult());
+ assertNotNull(future2.get().getSubRequestId());
+
return requestCaptor.getValue().getEntity();
}