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.java6
1 files changed, 5 insertions, 1 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 6e9c2239c..cd4f3b593 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
@@ -24,6 +24,7 @@ package org.onap.policy.simulators;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
+import com.google.protobuf.util.JsonFormat;
import io.grpc.ManagedChannel;
import io.grpc.internal.DnsNameResolverProvider;
import io.grpc.internal.PickFirstLoadBalancerProvider;
@@ -42,6 +43,7 @@ import org.junit.Test;
import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc;
import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc.BluePrintProcessingServiceStub;
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput;
+import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput.Builder;
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.coder.StandardCoder;
@@ -72,7 +74,9 @@ public class CdsSimulatorTest {
@Test
public void test() throws Exception {
String reqstr = IOUtils.toString(getClass().getResource("cds/cds.request.json"), StandardCharsets.UTF_8);
- ExecutionServiceInput request = coder.decode(reqstr, ExecutionServiceInput.class);
+ Builder builder = ExecutionServiceInput.newBuilder();
+ JsonFormat.parser().ignoringUnknownFields().merge(reqstr, builder);
+ ExecutionServiceInput request = builder.build();
ManagedChannel channel = NettyChannelBuilder.forAddress(Util.LOCALHOST, sim.getPort())
.nameResolverFactory(new DnsNameResolverProvider())
.loadBalancerFactory(new PickFirstLoadBalancerProvider()).usePlaintext().build();