summaryrefslogtreecommitdiffstats
path: root/policy-management/src/test
diff options
context:
space:
mode:
authorJorge Hernandez <jorge.hernandez-herrero@att.com>2018-12-03 19:40:19 +0000
committerGerrit Code Review <gerrit@onap.org>2018-12-03 19:40:19 +0000
commite9e1ce7afc29bb68277acd421dfad1284a8d64f7 (patch)
tree3028cbaca63580c3fa2883f8d21490f5154e2d9b /policy-management/src/test
parent45eb320e70488c701c50ec73aff47c7740f01485 (diff)
parentc01d5ca4f36b21eb4a08db16498a25a3f28351e2 (diff)
Merge "Fix sonar issue in droolspdf"
Diffstat (limited to 'policy-management/src/test')
-rw-r--r--policy-management/src/test/java/org/onap/policy/drools/protocol/coders/ProtocolCoderToolsetTest.java23
1 files changed, 17 insertions, 6 deletions
diff --git a/policy-management/src/test/java/org/onap/policy/drools/protocol/coders/ProtocolCoderToolsetTest.java b/policy-management/src/test/java/org/onap/policy/drools/protocol/coders/ProtocolCoderToolsetTest.java
index 28168178..d28f1e52 100644
--- a/policy-management/src/test/java/org/onap/policy/drools/protocol/coders/ProtocolCoderToolsetTest.java
+++ b/policy-management/src/test/java/org/onap/policy/drools/protocol/coders/ProtocolCoderToolsetTest.java
@@ -105,9 +105,14 @@ public class ProtocolCoderToolsetTest {
* @param protocolFilter protocol filter
*/
public void testGsonToolset(JsonProtocolFilter protocolFilter) {
- GsonProtocolCoderToolset gsonToolset = new GsonProtocolCoderToolset(JUNIT_PROTOCOL_CODER_TOPIC, CONTROLLER_ID,
- this.releaseId.getGroupId(), this.releaseId.getArtifactId(), Triple.class.getCanonicalName(),
- protocolFilter, null, 12345678);
+ GsonProtocolCoderToolset gsonToolset = new GsonProtocolCoderToolset(
+ EventProtocolParams.builder().topic(JUNIT_PROTOCOL_CODER_TOPIC)
+ .groupId(this.releaseId.getGroupId())
+ .artifactId(this.releaseId.getArtifactId())
+ .eventClass(Triple.class.getCanonicalName())
+ .protocolFilter(protocolFilter)
+ .customGsonCoder(null)
+ .modelClassLoaderHash(12345678), CONTROLLER_ID);
Assert.assertNotNull(gsonToolset.getEncoder());
Assert.assertNotNull(gsonToolset.getDecoder());
@@ -130,9 +135,15 @@ public class ProtocolCoderToolsetTest {
* @param protocolFilter protocol filter
*/
public void testJacksonToolset(JsonProtocolFilter protocolFilter) {
- JacksonProtocolCoderToolset jacksonToolset = new JacksonProtocolCoderToolset(JUNIT_PROTOCOL_CODER_TOPIC,
- CONTROLLER_ID, this.releaseId.getGroupId(), this.releaseId.getArtifactId(),
- Triple.class.getCanonicalName(), protocolFilter, null, 12345678);
+ JacksonProtocolCoderToolset jacksonToolset = new JacksonProtocolCoderToolset(
+ EventProtocolParams.builder()
+ .topic(JUNIT_PROTOCOL_CODER_TOPIC)
+ .groupId(this.releaseId.getGroupId())
+ .artifactId(this.releaseId.getArtifactId())
+ .eventClass(Triple.class.getCanonicalName())
+ .protocolFilter(protocolFilter)
+ .customJacksonCoder(null)
+ .modelClassLoaderHash(12345678), CONTROLLER_ID);
jacksonToolset.getEncoder().setVisibility(PropertyAccessor.FIELD, Visibility.ANY);
jacksonToolset.getDecoder().setVisibility(PropertyAccessor.FIELD, Visibility.ANY);