summaryrefslogtreecommitdiffstats
path: root/policy-management/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'policy-management/src/test')
-rw-r--r--policy-management/src/test/java/org/onap/policy/drools/protocol/coders/EventProtocolCoderTest.java9
-rw-r--r--policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineTest.java12
2 files changed, 13 insertions, 8 deletions
diff --git a/policy-management/src/test/java/org/onap/policy/drools/protocol/coders/EventProtocolCoderTest.java b/policy-management/src/test/java/org/onap/policy/drools/protocol/coders/EventProtocolCoderTest.java
index d6330cd5..ec1b9994 100644
--- a/policy-management/src/test/java/org/onap/policy/drools/protocol/coders/EventProtocolCoderTest.java
+++ b/policy-management/src/test/java/org/onap/policy/drools/protocol/coders/EventProtocolCoderTest.java
@@ -84,9 +84,12 @@ public class EventProtocolCoderTest {
TopicEndpoint.manager.addTopicSinks(noopSinkProperties);
- EventProtocolCoder.manager.addEncoder(ENCODER_GROUP, ENCODER_ARTIFACT, NOOP_TOPIC,
- DroolsConfiguration.class.getCanonicalName(), new JsonProtocolFilter(), null, null,
- DroolsConfiguration.class.getName().hashCode());
+ EventProtocolCoder.manager.addEncoder(
+ EventProtocolParams.builder().groupId(ENCODER_GROUP).artifactId(ENCODER_ARTIFACT)
+ .topic(NOOP_TOPIC).eventClass(DroolsConfiguration.class.getCanonicalName())
+ .protocolFilter(new JsonProtocolFilter()).customGsonCoder(null)
+ .customJacksonCoder(null)
+ .modelClassLoaderHash(DroolsConfiguration.class.getName().hashCode()));
final String json = EventProtocolCoder.manager.encode(NOOP_TOPIC,
new DroolsConfiguration(ENCODER_GROUP, ENCODER_ARTIFACT, ENCODER_VERSION));
diff --git a/policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineTest.java b/policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineTest.java
index cd93d94c..4a2767a8 100644
--- a/policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineTest.java
+++ b/policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineTest.java
@@ -41,10 +41,9 @@ import org.onap.policy.common.endpoints.properties.PolicyEndPointProperties;
import org.onap.policy.drools.persistence.SystemPersistence;
import org.onap.policy.drools.properties.DroolsProperties;
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.protocol.configuration.DroolsConfiguration;
-import org.onap.policy.drools.system.PolicyController;
-import org.onap.policy.drools.system.PolicyEngine;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -205,9 +204,12 @@ public class PolicyEngineTest {
TopicEndpoint.manager.addTopicSinks(noopSinkProperties).get(0).start();
- EventProtocolCoder.manager.addEncoder(ENCODER_GROUP, ENCODER_ARTIFACT, NOOP_TOPIC,
- DroolsConfiguration.class.getCanonicalName(), new JsonProtocolFilter(), null, null,
- DroolsConfiguration.class.getName().hashCode());
+ EventProtocolCoder.manager.addEncoder(
+ EventProtocolParams.builder().groupId(ENCODER_GROUP).artifactId(ENCODER_ARTIFACT)
+ .topic(NOOP_TOPIC).eventClass(DroolsConfiguration.class.getCanonicalName())
+ .protocolFilter(new JsonProtocolFilter()).customGsonCoder(null)
+ .customJacksonCoder(null)
+ .modelClassLoaderHash(DroolsConfiguration.class.getName().hashCode()));
assertTrue(PolicyEngine.manager.deliver(NOOP_TOPIC,
new DroolsConfiguration(ENCODER_GROUP, ENCODER_ARTIFACT, ENCODER_VERSION)));