summaryrefslogtreecommitdiffstats
path: root/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VcpeControlLoopTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VcpeControlLoopTest.java')
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VcpeControlLoopTest.java26
1 files changed, 20 insertions, 6 deletions
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VcpeControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VcpeControlLoopTest.java
index a27dbd026..c6d6dc082 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VcpeControlLoopTest.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VcpeControlLoopTest.java
@@ -55,6 +55,7 @@ import org.onap.policy.controlloop.VirtualControlLoopEvent;
import org.onap.policy.controlloop.VirtualControlLoopNotification;
import org.onap.policy.controlloop.policy.ControlLoopPolicy;
import org.onap.policy.drools.protocol.coders.EventProtocolCoder;
+import org.onap.policy.drools.protocol.coders.EventProtocolParams;
import org.onap.policy.drools.protocol.coders.JsonProtocolFilter;
import org.onap.policy.drools.system.PolicyController;
import org.onap.policy.drools.system.PolicyEngine;
@@ -98,11 +99,24 @@ public class VcpeControlLoopTest implements TopicListener {
"org.onap.policy.controlloop.util.Serialization,gsonPretty");
noopTopics = TopicEndpoint.manager.addTopicSinks(noopSinkProperties);
- EventProtocolCoder.manager.addEncoder("junit.groupId", "junit.artifactId", "POLICY-CL-MGT",
- "org.onap.policy.controlloop.VirtualControlLoopNotification", new JsonProtocolFilter(), null, null,
- 1111);
- EventProtocolCoder.manager.addEncoder("junit.groupId", "junit.artifactId", "APPC-LCM-READ",
- "org.onap.policy.appclcm.LcmRequestWrapper", new JsonProtocolFilter(), null, null, 1111);
+ EventProtocolCoder.manager.addEncoder(EventProtocolParams.builder()
+ .groupId("junit.groupId")
+ .artifactId("junit.artifactId")
+ .topic("POLICY-CL-MGT")
+ .eventClass("org.onap.policy.controlloop.VirtualControlLoopNotification")
+ .protocolFilter(new JsonProtocolFilter())
+ .customGsonCoder(null)
+ .customJacksonCoder(null)
+ .modelClassLoaderHash(1111));
+ EventProtocolCoder.manager.addEncoder(EventProtocolParams.builder()
+ .groupId("junit.groupId")
+ .artifactId("junit.artifactId")
+ .topic("APPC-LCM-READ")
+ .eventClass("org.onap.policy.appclcm.LcmRequestWrapper")
+ .protocolFilter(new JsonProtocolFilter())
+ .customGsonCoder(null)
+ .customJacksonCoder(null)
+ .modelClassLoaderHash(1111));
try {
Util.buildAaiSim();
Util.buildGuardSim();
@@ -359,7 +373,7 @@ public class VcpeControlLoopTest implements TopicListener {
* message) or end the control loop (abatement message).
*
* @param policy the controlLoopName comes from the policy
- * @param requestID the requestId for this event
+ * @param requestId the requestId for this event
* @param status could be onset or abated
*/
protected void sendEvent(ControlLoopPolicy policy, UUID requestId, ControlLoopEventStatus status) {