Remove unused imports in controlpolicy 53/72853/3
authorkris.jinka <kris.jinka@samsung.com>
Fri, 16 Nov 2018 01:26:19 +0000 (10:26 +0900)
committerkris.jinka <kris.jinka@samsung.com>
Fri, 16 Nov 2018 02:35:24 +0000 (11:35 +0900)
Remove unused imports that got introduced in recent commits
Fix issue with compile failure of test class due to dependency
in drools-pdp Datamodel classes. Fix test failures due to
compile issues

Issue-ID: POLICY-1251
Change-Id: Ib8e496ab96aaa5de67e4f84fa8de515b3dc22ea5
Signed-off-by: kris.jinka <kris.jinka@samsung.com>
12 files changed:
controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/builder/ControlLoopPolicyBuilder.java
controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/builder/impl/ControlLoopPolicyBuilderImpl.java
controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopCoordinationTest.java
controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopEventCleanupTest.java
controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnControlLoopTest.java
controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopEventCleanupTest.java
controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopFailureTest.java
controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VcpeControlLoopTest.java
controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VdnsControlLoopTest.java
controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfcControlLoopTest.java
controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfwControlLoopTest.java
controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VpciControlLoopTest.java

index 3c43756..533e19b 100644 (file)
 
 package org.onap.policy.controlloop.policy.builder;
 
-import java.util.Map;
-
 import org.onap.policy.aai.Pnf;
 import org.onap.policy.controlloop.policy.ControlLoop;
 import org.onap.policy.controlloop.policy.OperationsAccumulateParams;
 import org.onap.policy.controlloop.policy.Policy;
 import org.onap.policy.controlloop.policy.PolicyParam;
 import org.onap.policy.controlloop.policy.PolicyResult;
-import org.onap.policy.controlloop.policy.Target;
 import org.onap.policy.controlloop.policy.builder.impl.ControlLoopPolicyBuilderImpl;
 import org.onap.policy.sdc.Resource;
 import org.onap.policy.sdc.Service;
index bd39398..efc0f11 100644 (file)
@@ -22,8 +22,8 @@ package org.onap.policy.controlloop.policy.builder.impl;
 
 import com.google.common.base.Strings;
 import java.util.LinkedList;
-import java.util.Map;
 import java.util.UUID;
+
 import org.onap.policy.aai.Pnf;
 import org.onap.policy.controlloop.compiler.CompilerException;
 import org.onap.policy.controlloop.compiler.ControlLoopCompiler;
@@ -35,7 +35,6 @@ import org.onap.policy.controlloop.policy.OperationsAccumulateParams;
 import org.onap.policy.controlloop.policy.Policy;
 import org.onap.policy.controlloop.policy.PolicyParam;
 import org.onap.policy.controlloop.policy.PolicyResult;
-import org.onap.policy.controlloop.policy.Target;
 import org.onap.policy.controlloop.policy.builder.BuilderException;
 import org.onap.policy.controlloop.policy.builder.ControlLoopPolicyBuilder;
 import org.onap.policy.controlloop.policy.builder.MessageLevel;
index 1d87799..588d005 100644 (file)
@@ -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
index da9b2a8..ef5fac6 100644 (file)
@@ -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();
index ea9e857..7469fdc 100644 (file)
@@ -49,6 +49,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;
@@ -88,9 +89,15 @@ public class CcvpnControlLoopTest 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(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));
 
         try {
             Util.buildAaiSim();
index 4ca89e1..0713a28 100644 (file)
@@ -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;
@@ -124,11 +125,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();
index 344e888..112d4df 100644 (file)
@@ -54,6 +54,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 ControlLoopFailureTest 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();
@@ -363,7 +377,7 @@ public class ControlLoopFailureTest 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
      * @param target the target entity to take an action on
      */
index a27dbd0..c6d6dc0 100644 (file)
@@ -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) {
index 564b12a..b5b7a48 100644 (file)
@@ -50,6 +50,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;
@@ -92,9 +93,15 @@ public class VdnsControlLoopTest 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(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));
 
         try {
             Util.buildAaiSim();
@@ -377,7 +384,7 @@ public class VdnsControlLoopTest 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) {
index d03bac2..5a5dc8a 100644 (file)
@@ -52,6 +52,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;
@@ -95,9 +96,15 @@ public class VfcControlLoopTest 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(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));
 
         try {
             Util.buildAaiSim();
@@ -343,7 +350,7 @@ public class VfcControlLoopTest 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) {
index adc9a2a..2bcaa5b 100644 (file)
@@ -53,6 +53,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;
@@ -96,11 +97,24 @@ public class VfwControlLoopTest 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-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();
@@ -398,7 +412,7 @@ public class VfwControlLoopTest 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) {
@@ -418,7 +432,7 @@ public class VfwControlLoopTest 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, String vnfId) {
index 6d1086d..89e309f 100644 (file)
@@ -52,6 +52,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;
@@ -99,11 +100,24 @@ public class VpciControlLoopTest 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", "SDNR-CL",
-                "org.onap.policy.sdnr.PciRequestWrapper", 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("SDNR-CL")
+                .eventClass("org.onap.policy.sdnr.PciRequestWrapper")
+                .protocolFilter(new JsonProtocolFilter())
+                .customGsonCoder(null)
+                .customJacksonCoder(null)
+                .modelClassLoaderHash(1111));
         try {
             Util.buildAaiSim();
             Util.buildGuardSim();
@@ -377,7 +391,7 @@ public class VpciControlLoopTest implements TopicListener {
      * 
      * @param policy
      *            the controlLoopName comes from the policy
-     * @param requestID
+     * @param requestId
      *            the requestId for this event
      * @param status
      *            could be onset