Set sub request ID before start callback
[policy/models.git] / models-interactions / model-actors / actorServiceProvider / src / test / java / org / onap / policy / controlloop / actorserviceprovider / impl / BidirectionalTopicOperationTest.java
index 48669f7..55782a3 100644 (file)
@@ -40,7 +40,6 @@ import java.util.concurrent.CompletableFuture;
 import java.util.function.BiConsumer;
 import lombok.Getter;
 import lombok.Setter;
-import org.apache.commons.lang3.tuple.Pair;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.ArgumentCaptor;
@@ -67,7 +66,6 @@ public class BidirectionalTopicOperationTest {
     private static final String OPERATION = "my-operation";
     private static final String REQ_ID = "my-request-id";
     private static final String TEXT = "some text";
-    private static final String SUB_REQID = "my-sub-request-id";
     private static final int TIMEOUT_SEC = 10;
     private static final long TIMEOUT_MS = 1000 * TIMEOUT_SEC;
     private static final int MAX_REQUESTS = 100;
@@ -138,8 +136,6 @@ public class BidirectionalTopicOperationTest {
         CompletableFuture<OperationOutcome> future = oper.startOperationAsync(1, outcome);
         assertFalse(future.isDone());
 
-        assertEquals(SUB_REQID, outcome.getSubRequestId());
-
         verify(forwarder).register(eq(Arrays.asList(REQ_ID)), listenerCaptor.capture());
 
         verify(forwarder, never()).unregister(any(), any());
@@ -183,8 +179,6 @@ public class BidirectionalTopicOperationTest {
         CompletableFuture<OperationOutcome> future = oper.startOperationAsync(1, outcome);
         assertFalse(future.isDone());
 
-        assertEquals(SUB_REQID, outcome.getSubRequestId());
-
         verify(forwarder).register(eq(Arrays.asList(REQ_ID)), listenerCaptor.capture());
 
         verify(forwarder, never()).unregister(any(), any());
@@ -363,8 +357,8 @@ public class BidirectionalTopicOperationTest {
         }
 
         @Override
-        protected Pair<String, String> makeRequest(int attempt) {
-            return Pair.of(SUB_REQID, TEXT);
+        protected String makeRequest(int attempt) {
+            return TEXT;
         }
 
         @Override
@@ -385,8 +379,8 @@ public class BidirectionalTopicOperationTest {
         }
 
         @Override
-        protected Pair<String, MyRequest> makeRequest(int attempt) {
-            return Pair.of(SUB_REQID, new MyRequest());
+        protected MyRequest makeRequest(int attempt) {
+            return new MyRequest();
         }
 
         @Override
@@ -407,8 +401,8 @@ public class BidirectionalTopicOperationTest {
         }
 
         @Override
-        protected Pair<String, MyRequest> makeRequest(int attempt) {
-            return Pair.of(SUB_REQID, new MyRequest());
+        protected MyRequest makeRequest(int attempt) {
+            return new MyRequest();
         }
 
         @Override