summaryrefslogtreecommitdiffstats
path: root/services/services-engine/src/test/java/org
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-09-07 15:11:46 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-09-07 15:11:55 +0100
commit07922e8590597e7a74a2059a1b344c92f04771c5 (patch)
treed7f0c7afc4c2a7830b959727049e1118472e8abb /services/services-engine/src/test/java/org
parenta41c877a6b1980e0e866699633e0289d9a3fdbb5 (diff)
Parameter group fields must have getters
Modifications to apex parameters to include getters that follow naming conventions, and knock on changes. Also checkstyle fixes taken in modifified classes. Issue-ID: POLICY-1095 Change-Id: Iff5ccc7a069a4ec2b2b974ed9f5ed70a88692e00 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'services/services-engine/src/test/java/org')
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java162
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java24
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ProducerConsumerTests.java36
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/SyncParameterTests.java49
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperCarrierTechnologyParameters.java3
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperDistributorParameters.java12
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperEventProducer.java1
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperExecutorParameters.java9
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperTokenDelimitedEventProtocolParameters.java2
9 files changed, 177 insertions, 121 deletions
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java
index 37f15777b..bfda220a5 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java
@@ -39,7 +39,8 @@ public class ContextParameterTests {
@Test
public void noParamsTest() {
- final String[] args = {"-c", "src/test/resources/parameters/serviceContextNoParams.json"};
+ final String[] args =
+ { "-c", "src/test/resources/parameters/serviceContextNoParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -47,14 +48,15 @@ public class ContextParameterTests {
fail("This test should throw an exception");
} catch (final ParameterException e) {
assertEquals("error reading parameters from \"src/test/resources/parameters/serviceContextNoParams.json\"\n"
- + "(ParameterRuntimeException):could not find field \"parameterClassName\" in "
- + "\"contextParameters\" entry", e.getMessage());
+ + "(ParameterRuntimeException):could not find field \"parameterClassName\" in "
+ + "\"contextParameters\" entry", e.getMessage());
}
}
@Test
public void badParamsTest() {
- final String[] args = {"-c", "src/test/resources/parameters/serviceContextBadParams.json"};
+ final String[] args =
+ { "-c", "src/test/resources/parameters/serviceContextBadParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -62,15 +64,16 @@ public class ContextParameterTests {
fail("This test should throw an exception");
} catch (final ParameterException e) {
assertEquals("error reading parameters from \"src/test/resources/parameters/serviceContextBadParams.json\""
- + "\n(ParameterRuntimeException):failed to deserialize the parameters for "
- + "\"contextParameters\" to parameter class \"hello\"\njava.lang.ClassNotFoundException: hello",
- e.getMessage());
+ + "\n(ParameterRuntimeException):failed to deserialize the parameters for "
+ + "\"contextParameters\" to parameter class \"hello\"\njava.lang.ClassNotFoundException: hello",
+ e.getMessage());
}
}
@Test
public void badPluginParamNameTest() {
- final String[] args = {"-c", "src/test/resources/parameters/serviceContextBadPluginNameParams.json"};
+ final String[] args =
+ { "-c", "src/test/resources/parameters/serviceContextBadPluginNameParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -78,33 +81,34 @@ public class ContextParameterTests {
fail("This test should throw an exception");
} catch (final ParameterException e) {
assertEquals("error reading parameters from "
- + "\"src/test/resources/parameters/serviceContextBadPluginNameParams.json\"\n"
- + "(ParameterRuntimeException):could not find field \"parameterClassName\" in "
- + "\"contextParameters\" entry", e.getMessage());
+ + "\"src/test/resources/parameters/serviceContextBadPluginNameParams.json\"\n"
+ + "(ParameterRuntimeException):could not find field \"parameterClassName\" in "
+ + "\"contextParameters\" entry", e.getMessage());
}
}
@Test
public void badClassParamTest() {
- final String[] args = {"-c", "src/test/resources/parameters/serviceContextBadClassParams.json"};
+ final String[] args =
+ { "-c", "src/test/resources/parameters/serviceContextBadClassParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
new ApexParameterHandler().getParameters(arguments);
fail("This test should throw an exception");
} catch (final ParameterException e) {
- assertEquals(
- "error reading parameters from \"src/test/resources/parameters/serviceContextBadClassParams.json\""
- + "\n(ParameterRuntimeException):failed to deserialize the parameters for \"contextParameters\""
- + " to parameter class \"java.lang.Integer\"\ncom.google.gson.JsonSyntaxException: "
- + "java.lang.IllegalStateException: Expected NUMBER but was BEGIN_OBJECT at path $",
- e.getMessage());
+ assertEquals("error reading parameters from \"src/test/resources/parameters/serviceContextBadClassParams.json\""
+ + "\n(ParameterRuntimeException):failed to deserialize the parameters for \"contextParameters\""
+ + " to parameter class \"java.lang.Integer\"\ncom.google.gson.JsonSyntaxException: "
+ + "java.lang.IllegalStateException: Expected NUMBER but was BEGIN_OBJECT at path $",
+ e.getMessage());
}
}
@Test
public void badPluginClassTest() {
- final String[] args = {"-c", "src/test/resources/parameters/serviceContextBadPluginClassParams.json"};
+ final String[] args =
+ { "-c", "src/test/resources/parameters/serviceContextBadPluginClassParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -112,24 +116,27 @@ public class ContextParameterTests {
fail("This test should throw an exception");
} catch (final ParameterException e) {
assertEquals("error reading parameters from "
- + "\"src/test/resources/parameters/serviceContextBadPluginClassParams.json\""
- + "\n(ClassCastException):org.onap.policy.apex.service.engine.parameters.dummyclasses."
- + "SuperDooperExecutorParameters"
- + " cannot be cast to org.onap.policy.apex.context.parameters.ContextParameters", e.getMessage());
+ + "\"src/test/resources/parameters/serviceContextBadPluginClassParams.json\""
+ + "\n(ClassCastException):org.onap.policy.apex.service.engine.parameters.dummyclasses."
+ + "SuperDooperExecutorParameters"
+ + " cannot be cast to org.onap.policy.apex.context.parameters.ContextParameters",
+ e.getMessage());
}
}
@Test
public void okFlushParamTest() {
- final String[] args = {"-c", "src/test/resources/parameters/serviceContextOKFlushParams.json"};
+ final String[] args =
+ { "-c", "src/test/resources/parameters/serviceContextOKFlushParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
- assertEquals("org.onap.policy.apex.context.parameters.ContextParameters", parameters
- .getEngineServiceParameters().getEngineParameters().getContextParameters().getClass().getCanonicalName());
+ assertEquals("org.onap.policy.apex.context.parameters.ContextParameters",
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getClass().getCanonicalName());
assertEquals(123456, parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getPersistorParameters().getFlushPeriod());
+ .getPersistorParameters().getFlushPeriod());
} catch (final ParameterException e) {
fail("This test should not throw any exception: " + e.getMessage());
}
@@ -137,15 +144,17 @@ public class ContextParameterTests {
@Test
public void okDefaultParamTest() {
- final String[] args = {"-c", "src/test/resources/parameters/serviceContextOKDefaultParams.json"};
+ final String[] args =
+ { "-c", "src/test/resources/parameters/serviceContextOKDefaultParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
- assertEquals("org.onap.policy.apex.context.parameters.ContextParameters", parameters
- .getEngineServiceParameters().getEngineParameters().getContextParameters().getClass().getCanonicalName());
+ assertEquals("org.onap.policy.apex.context.parameters.ContextParameters",
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getClass().getCanonicalName());
assertEquals(300000, parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getPersistorParameters().getFlushPeriod());
+ .getPersistorParameters().getFlushPeriod());
} catch (final ParameterException e) {
fail("This test should not throw any exception: " + e.getMessage());
}
@@ -153,16 +162,18 @@ public class ContextParameterTests {
@Test
public void okDistParamTest() {
- final String[] args = {"-c", "src/test/resources/parameters/serviceContextOKDistParams.json"};
+ final String[] args =
+ { "-c", "src/test/resources/parameters/serviceContextOKDistParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
- assertEquals("org.onap.policy.apex.context.parameters.ContextParameters", parameters
- .getEngineServiceParameters().getEngineParameters().getContextParameters().getClass().getCanonicalName());
+ assertEquals("org.onap.policy.apex.context.parameters.ContextParameters",
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getClass().getCanonicalName());
assertEquals("org.onap.policy.apex.context.parameters.DistributorParameters",
- parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getDistributorParameters().getClass().getCanonicalName());
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getDistributorParameters().getClass().getCanonicalName());
} catch (final ParameterException e) {
fail("This test should not throw any exception: " + e.getMessage());
}
@@ -170,24 +181,26 @@ public class ContextParameterTests {
@Test
public void okFullDefaultParamTest() {
- final String[] args = {"-c", "src/test/resources/parameters/goodParams.json"};
+ final String[] args =
+ { "-c", "src/test/resources/parameters/goodParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
- assertEquals("org.onap.policy.apex.context.parameters.ContextParameters", parameters
- .getEngineServiceParameters().getEngineParameters().getContextParameters().getClass().getCanonicalName());
+ assertEquals("org.onap.policy.apex.context.parameters.ContextParameters",
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getClass().getCanonicalName());
assertEquals("org.onap.policy.apex.context.parameters.DistributorParameters",
- parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getDistributorParameters().getClass().getCanonicalName());
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getDistributorParameters().getClass().getCanonicalName());
assertEquals("org.onap.policy.apex.context.parameters.LockManagerParameters",
- parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getLockManagerParameters().getClass().getCanonicalName());
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getLockManagerParameters().getClass().getCanonicalName());
assertEquals("org.onap.policy.apex.context.parameters.PersistorParameters",
- parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getPersistorParameters().getClass().getCanonicalName());
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getPersistorParameters().getClass().getCanonicalName());
assertEquals(300000, parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getPersistorParameters().getFlushPeriod());
+ .getPersistorParameters().getFlushPeriod());
} catch (final ParameterException e) {
fail("This test should not throw any exception: " + e.getMessage());
}
@@ -195,31 +208,33 @@ public class ContextParameterTests {
@Test
public void okFullParamTest() {
- final String[] args = {"-c", "src/test/resources/parameters/serviceContextOKFullParams.json"};
+ final String[] args =
+ { "-c", "src/test/resources/parameters/serviceContextOKFullParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
- assertEquals("org.onap.policy.apex.context.parameters.ContextParameters", parameters
- .getEngineServiceParameters().getEngineParameters().getContextParameters().getClass().getCanonicalName());
+ assertEquals("org.onap.policy.apex.context.parameters.ContextParameters",
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getClass().getCanonicalName());
assertEquals("org.onap.policy.apex.context.parameters.LockManagerParameters",
- parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getLockManagerParameters().getClass().getCanonicalName());
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getLockManagerParameters().getClass().getCanonicalName());
assertEquals("org.onap.policy.apex.context.parameters.PersistorParameters",
- parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getPersistorParameters().getClass().getCanonicalName());
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getPersistorParameters().getClass().getCanonicalName());
assertEquals(123456, parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getPersistorParameters().getFlushPeriod());
+ .getPersistorParameters().getFlushPeriod());
- final SuperDooperDistributorParameters infinispanParameters =
- (SuperDooperDistributorParameters) parameters.getEngineServiceParameters().getEngineParameters()
- .getContextParameters().getDistributorParameters();
+ final SuperDooperDistributorParameters infinispanParameters = (SuperDooperDistributorParameters) parameters
+ .getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getDistributorParameters();
assertEquals("org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperDistributorParameters",
- infinispanParameters.getClass().getCanonicalName());
+ infinispanParameters.getClass().getCanonicalName());
assertEquals("my/lovely/configFile.xml", infinispanParameters.getConfigFile());
assertEquals("holy/stone.xml", infinispanParameters.getJgroupsFile());
- assertEquals(false, infinispanParameters.preferIPv4Stack());
- assertEquals("fatherted", infinispanParameters.getjGroupsBindAddress());
+ assertEquals(false, infinispanParameters.isPreferIPv4Stack());
+ assertEquals("fatherted", infinispanParameters.getJgroupsBindAddress());
} catch (final ParameterException e) {
fail("This test should not throw any exception: " + e.getMessage());
@@ -228,7 +243,8 @@ public class ContextParameterTests {
@Test
public void badClassDistParamTest() {
- final String[] args = {"-c", "src/test/resources/parameters/serviceContextBadClassDistParams.json"};
+ final String[] args =
+ { "-c", "src/test/resources/parameters/serviceContextBadClassDistParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -236,15 +252,16 @@ public class ContextParameterTests {
fail("This test should throw an exception");
} catch (final ParameterException e) {
assertEquals("error reading parameters from "
- + "\"src/test/resources/parameters/serviceContextBadClassDistParams.json\"\n"
- + "(ClassCastException):org.onap.policy.apex.context.parameters.ContextParameters cannot be cast to"
- + " org.onap.policy.apex.context.parameters.DistributorParameters", e.getMessage());
+ + "\"src/test/resources/parameters/serviceContextBadClassDistParams.json\"\n"
+ + "(ClassCastException):org.onap.policy.apex.context.parameters.ContextParameters cannot be cast to"
+ + " org.onap.policy.apex.context.parameters.DistributorParameters", e.getMessage());
}
}
@Test
public void badClassLockParamTest() {
- final String[] args = {"-c", "src/test/resources/parameters/serviceContextBadClassLockParams.json"};
+ final String[] args =
+ { "-c", "src/test/resources/parameters/serviceContextBadClassLockParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -252,15 +269,16 @@ public class ContextParameterTests {
fail("This test should throw an exception");
} catch (final ParameterException e) {
assertEquals("error reading parameters from "
- + "\"src/test/resources/parameters/serviceContextBadClassLockParams.json\"\n"
- + "(ClassCastException):org.onap.policy.apex.context.parameters.ContextParameters cannot be cast to"
- + " org.onap.policy.apex.context.parameters.LockManagerParameters", e.getMessage());
+ + "\"src/test/resources/parameters/serviceContextBadClassLockParams.json\"\n"
+ + "(ClassCastException):org.onap.policy.apex.context.parameters.ContextParameters cannot be cast to"
+ + " org.onap.policy.apex.context.parameters.LockManagerParameters", e.getMessage());
}
}
@Test
public void badClassPersistParamTest() {
- final String[] args = {"-c", "src/test/resources/parameters/serviceContextBadClassPersistParams.json"};
+ final String[] args =
+ { "-c", "src/test/resources/parameters/serviceContextBadClassPersistParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -268,9 +286,9 @@ public class ContextParameterTests {
fail("This test should throw an exception");
} catch (final ParameterException e) {
assertEquals("error reading parameters from "
- + "\"src/test/resources/parameters/serviceContextBadClassPersistParams.json\"\n"
- + "(ClassCastException):org.onap.policy.apex.context.parameters.ContextParameters cannot be cast to"
- + " org.onap.policy.apex.context.parameters.PersistorParameters", e.getMessage());
+ + "\"src/test/resources/parameters/serviceContextBadClassPersistParams.json\"\n"
+ + "(ClassCastException):org.onap.policy.apex.context.parameters.ContextParameters cannot be cast to"
+ + " org.onap.policy.apex.context.parameters.PersistorParameters", e.getMessage());
}
}
}
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java
index 31ccd913f..97724becc 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java
@@ -48,7 +48,8 @@ import org.onap.policy.common.parameters.ParameterException;
public class ParameterTests {
@Test
public void invalidParametersNoFileTest() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/invalidNoFile.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/invalidNoFile.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -62,7 +63,8 @@ public class ParameterTests {
@Test
public void invalidParametersEmptyTest() {
- final String[] args = { "-c", "src/test/resources/parameters/empty.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/empty.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -76,7 +78,8 @@ public class ParameterTests {
@Test
public void invalidParametersNoParamsTest() {
- final String[] args = { "-c", "src/test/resources/parameters/noParams.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/noParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -97,7 +100,8 @@ public class ParameterTests {
@Test
public void invalidParametersBlankParamsTest() {
- final String[] args = { "-c", "src/test/resources/parameters/blankParams.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/blankParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -123,7 +127,8 @@ public class ParameterTests {
@Test
public void invalidParametersTest() {
- final String[] args = { "-c", "src/test/resources/parameters/badParams.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/badParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -171,7 +176,8 @@ public class ParameterTests {
@Test
public void goodParametersTest() {
- final String[] args = { "-c", "src/test/resources/parameters/goodParams.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/goodParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -222,7 +228,8 @@ public class ParameterTests {
@Test
public void superDooperParametersTest() {
- final String[] args = { "-c", "src/test/resources/parameters/superDooperParams.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/superDooperParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -268,7 +275,8 @@ public class ParameterTests {
assertEquals("some.key.deserailizer", superDooperParameters.getKeyDeserializer());
assertEquals("some.value.deserailizer", superDooperParameters.getValueDeserializer());
- final String[] consumerTopics = { "consumer-out-0", "consumer-out-1", "consumer-out-2" };
+ final String[] consumerTopics =
+ { "consumer-out-0", "consumer-out-1", "consumer-out-2" };
assertEquals(Arrays.asList(consumerTopics), superDooperParameters.getConsumerTopicList());
} catch (final ParameterException e) {
fail("This test should not throw an exception");
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ProducerConsumerTests.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ProducerConsumerTests.java
index 8bcc1bd37..26cf09c38 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ProducerConsumerTests.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ProducerConsumerTests.java
@@ -38,7 +38,8 @@ import org.onap.policy.common.parameters.ParameterException;
public class ProducerConsumerTests {
@Test
public void goodParametersTest() {
- final String[] args = { "-c", "src/test/resources/parameters/goodParams.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/goodParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -72,7 +73,8 @@ public class ProducerConsumerTests {
@Test
public void noCarrierTechnology() {
- final String[] args = { "-c", "src/test/resources/parameters/prodConsNoCT.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/prodConsNoCT.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -93,7 +95,8 @@ public class ProducerConsumerTests {
@Test
public void noEventProcol() {
- final String[] args = { "-c", "src/test/resources/parameters/prodConsNoEP.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/prodConsNoEP.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -124,7 +127,8 @@ public class ProducerConsumerTests {
@Test
public void noCarrierTechnologyParClass() {
- final String[] args = { "-c", "src/test/resources/parameters/prodConsNoCTParClass.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/prodConsNoCTParClass.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -139,7 +143,8 @@ public class ProducerConsumerTests {
@Test
public void mismatchCarrierTechnologyParClass() {
- final String[] args = { "-c", "src/test/resources/parameters/prodConsMismatchCTParClass.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/prodConsMismatchCTParClass.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -158,7 +163,8 @@ public class ProducerConsumerTests {
@Test
public void wrongTypeCarrierTechnologyParClass() {
- final String[] args = { "-c", "src/test/resources/parameters/prodConsWrongTypeCTParClass.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/prodConsWrongTypeCTParClass.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -177,7 +183,8 @@ public class ProducerConsumerTests {
@Test
public void okFileNameCarrierTechnology() {
- final String[] args = { "-c", "src/test/resources/parameters/prodConsOKFileName.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/prodConsOKFileName.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -195,7 +202,8 @@ public class ProducerConsumerTests {
@Test
public void badFileNameCarrierTechnology() {
- final String[] args = { "-c", "src/test/resources/parameters/prodConsBadFileName.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/prodConsBadFileName.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -220,7 +228,8 @@ public class ProducerConsumerTests {
@Test
public void badEventProtocolParClass() {
- final String[] args = { "-c", "src/test/resources/parameters/prodConsBadEPParClass.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/prodConsBadEPParClass.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -237,7 +246,8 @@ public class ProducerConsumerTests {
@Test
public void noEventProtocolParClass() {
- final String[] args = { "-c", "src/test/resources/parameters/prodConsNoEPParClass.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/prodConsNoEPParClass.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -252,7 +262,8 @@ public class ProducerConsumerTests {
@Test
public void mismatchEventProtocolParClass() {
- final String[] args = { "-c", "src/test/resources/parameters/prodConsMismatchEPParClass.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/prodConsMismatchEPParClass.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -271,7 +282,8 @@ public class ProducerConsumerTests {
@Test
public void wrongTypeEventProtocolParClass() {
- final String[] args = { "-c", "src/test/resources/parameters/prodConsWrongTypeEPParClass.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/prodConsWrongTypeEPParClass.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/SyncParameterTests.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/SyncParameterTests.java
index 1c291786f..7913af84c 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/SyncParameterTests.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/SyncParameterTests.java
@@ -45,7 +45,8 @@ import org.onap.policy.common.parameters.ParameterException;
public class SyncParameterTests {
@Test
public void syncBadNoSyncWithPeer() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/syncBadParamsNoSyncWithPeer.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncBadParamsNoSyncWithPeer.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -67,7 +68,8 @@ public class SyncParameterTests {
@Test
public void syncBadNotSyncWithPeer() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/syncBadParamsNotSyncWithPeer.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncBadParamsNotSyncWithPeer.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -89,7 +91,8 @@ public class SyncParameterTests {
@Test
public void syncBadSyncBadPeers() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/syncBadParamsBadPeers.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncBadParamsBadPeers.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -124,7 +127,8 @@ public class SyncParameterTests {
@Test
public void syncBadSyncInvalidTimeout() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/syncBadParamsInvalidTimeout.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncBadParamsInvalidTimeout.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -145,8 +149,8 @@ public class SyncParameterTests {
+ "\"org.onap.policy.apex.service.parameters.eventhandler.EventHandlerParameters\" "
+ "INVALID, specified peered mode \"SYNCHRONOUS\" timeout value \"-3\" is illegal, "
+ "specify a non-negative timeout value in milliseconds\n"
- + " parameter group map \"eventInputParameters\" INVALID, parameter group has status INVALID\n"
- + " parameter group \"SyncConsumer0\" type "
+ + " parameter group map \"eventInputParameters\" INVALID, "
+ + "parameter group has status INVALID\n" + " parameter group \"SyncConsumer0\" type "
+ "\"org.onap.policy.apex.service.parameters.eventhandler.EventHandlerParameters\" INVALID, "
+ "specified peered mode \"SYNCHRONOUS\" timeout value \"-1\" is illegal, "
+ "specify a non-negative timeout value in milliseconds\n"
@@ -159,7 +163,8 @@ public class SyncParameterTests {
@Test
public void syncBadSyncBadTimeout() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/syncBadParamsBadTimeout.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncBadParamsBadTimeout.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -181,7 +186,8 @@ public class SyncParameterTests {
@Test
public void syncBadSyncUnpairedTimeout() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/syncBadParamsUnpairedTimeout.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncBadParamsUnpairedTimeout.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -217,7 +223,8 @@ public class SyncParameterTests {
@Test
public void syncGoodSyncGoodTimeoutProducer() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/syncGoodParamsProducerTimeout.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncGoodParamsProducerTimeout.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -237,7 +244,8 @@ public class SyncParameterTests {
@Test
public void syncGoodSyncGoodTimeoutConsumer() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/syncGoodParamsConsumerTimeout.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncGoodParamsConsumerTimeout.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -257,7 +265,8 @@ public class SyncParameterTests {
@Test
public void syncGoodSyncGoodTimeoutBoth() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/syncGoodParamsBothTimeout.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncGoodParamsBothTimeout.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -277,7 +286,8 @@ public class SyncParameterTests {
@Test
public void syncUnusedConsumerPeers() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/syncUnusedConsumerPeers.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncUnusedConsumerPeers.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -306,7 +316,8 @@ public class SyncParameterTests {
@Test
public void syncMismatchedPeers() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/syncMismatchedPeers.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncMismatchedPeers.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -342,7 +353,8 @@ public class SyncParameterTests {
@Test
public void syncUnusedProducerPeers() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/syncUnusedProducerPeers.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncUnusedProducerPeers.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -369,7 +381,8 @@ public class SyncParameterTests {
@Test
public void syncMismatchedTimeout() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/syncMismatchedTimeout.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncMismatchedTimeout.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -399,7 +412,8 @@ public class SyncParameterTests {
@Test
public void syncGoodParametersTest() {
- final String[] args = { "-c", "src/test/resources/parameters/syncGoodParams.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncGoodParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -462,7 +476,8 @@ public class SyncParameterTests {
assertEquals("org.apache.superDooper.common.serialization.StringDeserializer",
superDooperParameters.getValueDeserializer());
- final String[] consumerTopics = { "apex-in" };
+ final String[] consumerTopics =
+ { "apex-in" };
assertEquals(Arrays.asList(consumerTopics), superDooperParameters.getConsumerTopicList());
} catch (final ParameterException e) {
fail("This test should not throw an exception");
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperCarrierTechnologyParameters.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperCarrierTechnologyParameters.java
index 3ec84b150..7eaf4c8e1 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperCarrierTechnologyParameters.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperCarrierTechnologyParameters.java
@@ -545,7 +545,8 @@ public class SuperDooperCarrierTechnologyParameters extends CarrierTechnologyPar
}
if (valueDeserializer == null || valueDeserializer.trim().length() == 0) {
- result.setResult("valueDeserializer", ValidationStatus.INVALID, "not specified, must be specified as a string");
+ result.setResult("valueDeserializer", ValidationStatus.INVALID,
+ "not specified, must be specified as a string");
}
return result;
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperDistributorParameters.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperDistributorParameters.java
index 72dbc57a6..a8d099654 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperDistributorParameters.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperDistributorParameters.java
@@ -40,7 +40,7 @@ public class SuperDooperDistributorParameters extends DistributorParameters {
private String configFile = DEFAULT_SUPER_DOOPER_DISTRIBUTION_CONFIG_FILE;
private String jgroupsFile = DEFAULT_SUPER_DOOPER_DISTRIBUTION_JGROUPS_FILE;
private boolean preferIPv4Stack = DEFAULT_SUPER_DOOPER_JAVA_NET_PREFER_IPV4_STACK;
- private String jGroupsBindAddress = DEFAULT_INFINSPAN_JGROUPS_BIND_ADDRESS;
+ private String jgroupsBindAddress = DEFAULT_INFINSPAN_JGROUPS_BIND_ADDRESS;
public SuperDooperDistributorParameters() {
super();
@@ -62,7 +62,7 @@ public class SuperDooperDistributorParameters extends DistributorParameters {
this.jgroupsFile = jgroupsFile;
}
- public boolean preferIPv4Stack() {
+ public boolean isPreferIPv4Stack() {
return preferIPv4Stack;
}
@@ -70,17 +70,17 @@ public class SuperDooperDistributorParameters extends DistributorParameters {
this.preferIPv4Stack = preferIPv4Stack;
}
- public String getjGroupsBindAddress() {
- return jGroupsBindAddress;
+ public String getJgroupsBindAddress() {
+ return jgroupsBindAddress;
}
public void setjGroupsBindAddress(final String jGroupsBindAddress) {
- this.jGroupsBindAddress = jGroupsBindAddress;
+ this.jgroupsBindAddress = jGroupsBindAddress;
}
@Override
public String toString() {
return "SuperDooperDistributorParameters [configFile=" + configFile + ", jgroupsFile=" + jgroupsFile
- + ", preferIPv4Stack=" + preferIPv4Stack + ", jGroupsBindAddress=" + jGroupsBindAddress + "]";
+ + ", preferIPv4Stack=" + preferIPv4Stack + ", jGroupsBindAddress=" + jgroupsBindAddress + "]";
}
}
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperEventProducer.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperEventProducer.java
index e405107f0..bfd651025 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperEventProducer.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperEventProducer.java
@@ -29,6 +29,7 @@ import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
/**
+ * Dummy event producer parameters.
* @author John Keeney (john.keeney@ericsson.com)
*/
public class SuperDooperEventProducer implements ApexEventProducer {
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperExecutorParameters.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperExecutorParameters.java
index a7bf4d5c8..270dd9bb6 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperExecutorParameters.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperExecutorParameters.java
@@ -23,12 +23,13 @@ package org.onap.policy.apex.service.engine.parameters.dummyclasses;
import org.onap.policy.apex.core.engine.ExecutorParameters;
/**
- * Default Executor parameters for MVEL.
- *
- * @author Liam Fallon (liam.fallon@ericsson.com)
- * @version
+ * Dummy executor parameters.
*/
public class SuperDooperExecutorParameters extends ExecutorParameters {
+
+ /**
+ * Instantiates a new super dooper executor parameters.
+ */
public SuperDooperExecutorParameters() {
this.setTaskExecutorPluginClass(
"org.onap.policy.apex.service.engine.parameters.dummyclasses.DummyTaskExecutor");
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperTokenDelimitedEventProtocolParameters.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperTokenDelimitedEventProtocolParameters.java
index 02d986186..ec4f97d78 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperTokenDelimitedEventProtocolParameters.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperTokenDelimitedEventProtocolParameters.java
@@ -24,7 +24,7 @@ import org.onap.policy.apex.service.engine.event.impl.jsonprotocolplugin.JSONEve
import org.onap.policy.apex.service.parameters.eventprotocol.EventProtocolTextTokenDelimitedParameters;
/**
- * @author Liam Fallon (liam.fallon@ericsson.com)
+ * Dummy token delimited parameters.
*/
public class SuperTokenDelimitedEventProtocolParameters extends EventProtocolTextTokenDelimitedParameters {
/** The label of this carrier technology. */