summaryrefslogtreecommitdiffstats
path: root/controlloop/templates/template.demo.clc
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/templates/template.demo.clc')
-rw-r--r--controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopCoordinationTest.java26
-rw-r--r--controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopEventCleanupTest.java24
2 files changed, 39 insertions, 11 deletions
diff --git a/controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopCoordinationTest.java b/controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopCoordinationTest.java
index 1d8779999..588d00563 100644
--- a/controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopCoordinationTest.java
+++ b/controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopCoordinationTest.java
@@ -60,6 +60,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;
@@ -104,11 +105,24 @@ public class ControlLoopCoordinationTest 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();
} catch (Exception e) {
@@ -172,7 +186,7 @@ public class ControlLoopCoordinationTest implements TopicListener {
* control loop (abatement message).
*
* @param controlLoopName the control loop name
- * @param requestID the requestId for this event
+ * @param requestId the requestId for this event
* @param status could be onset or abated
* @param target the target name
* @param kieSession the kieSession to which this event is being sent
diff --git a/controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopEventCleanupTest.java b/controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopEventCleanupTest.java
index da9b2a85b..ef5fac693 100644
--- a/controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopEventCleanupTest.java
+++ b/controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopEventCleanupTest.java
@@ -47,6 +47,7 @@ import org.onap.policy.controlloop.VirtualControlLoopEvent;
import org.onap.policy.controlloop.eventmanager.ControlLoopEventManager;
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;
@@ -123,11 +124,24 @@ public class ControlLoopEventCleanupTest {
"org.onap.policy.controlloop.util.Serialization,gsonPretty");
final List<TopicSink> 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-CL",
- "org.onap.policy.appc.Request", 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-CL")
+ .eventClass("org.onap.policy.appc.Request")
+ .protocolFilter(new JsonProtocolFilter())
+ .customGsonCoder(null)
+ .customJacksonCoder(null)
+ .modelClassLoaderHash(1111));
try {
Util.buildAaiSim();