summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.aai/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'models-interactions/model-actors/actor.aai/src/test')
-rw-r--r--models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperationTest.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperationTest.java b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperationTest.java
index ca6cfb2f8..386eb219a 100644
--- a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperationTest.java
+++ b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperationTest.java
@@ -38,14 +38,11 @@ import java.util.TreeMap;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;
-import javax.ws.rs.client.Entity;
import javax.ws.rs.client.InvocationCallback;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Captor;
import org.mockito.Mock;
import org.onap.policy.aai.AaiConstants;
import org.onap.policy.aai.AaiCqResponse;
@@ -70,9 +67,6 @@ public class AaiCustomQueryOperationTest extends BasicAaiOperation<Map<String, S
private static final String MY_VSERVER = "my-vserver-name";
private static final String SIM_VSERVER = "OzVServer";
- @Captor
- private ArgumentCaptor<Entity<Map<String, String>>> entityCaptor;
-
@Mock
private Actor tenantActor;
@@ -215,10 +209,13 @@ public class AaiCustomQueryOperationTest extends BasicAaiOperation<Map<String, S
oper.start();
executor.runAll(100);
- verify(webAsync).put(entityCaptor.capture(), any(InvocationCallback.class));
+ verify(webAsync).put(requestCaptor.capture(), any(InvocationCallback.class));
+
+ String reqText = requestCaptor.getValue().getEntity();
+ Map<String,String> reqMap = coder.decode(reqText, Map.class);
// sort the request fields so they match the order in cq.json
- Map<String, String> request = new TreeMap<>(entityCaptor.getValue().getEntity());
+ Map<String, String> request = new TreeMap<>(reqMap);
verifyRequest("cq.json", request);
}