summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-simulators/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'models-interactions/model-simulators/src/test')
-rw-r--r--models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/CdsSimulatorTest.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/CdsSimulatorTest.java b/models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/CdsSimulatorTest.java
index cd4f3b593..07ec0dc04 100644
--- a/models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/CdsSimulatorTest.java
+++ b/models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/CdsSimulatorTest.java
@@ -128,13 +128,16 @@ public class CdsSimulatorTest {
}
@Test
- public void testGetResponseString() throws IOException, CoderException, ParseException {
+ public void testGetResponse() throws IOException, CoderException, ParseException {
CdsSimulator cdsSimulator = new CdsSimulator(Util.LOCALHOST, sim.getPort());
String reqstr = ResourceUtils.getResourceAsString(
"org/onap/policy/simulators/cds/cds.request.json");
String responseqstr = ResourceUtils.getResourceAsString(
"org/onap/policy/simulators/cds/pm_control-create-subscription.json");
ExecutionServiceInput request = coder.decode(reqstr, ExecutionServiceInput.class);
- assertEquals(responseqstr, cdsSimulator.getResponseString(request, 0));
+ org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput.Builder esoBuilder =
+ ExecutionServiceOutput.newBuilder();
+ JsonFormat.parser().ignoringUnknownFields().merge(responseqstr, esoBuilder);
+ assertEquals(esoBuilder.toString(), cdsSimulator.getResponse(request, 0).toString());
}
}