aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorParshad Patel <pars.patel@samsung.com>2018-11-26 18:22:40 +0900
committerParshad Patel <pars.patel@samsung.com>2018-11-26 18:31:00 +0900
commitd697d828df129afa52555e9381d69c45d526c7d6 (patch)
tree8e2b40c0a7677dd87ec420c6e1c09602b9035363
parent6a55a271c6ca735ceaf4ab306633cb30715561bd (diff)
Rename test classes in drools-applications
Make test classes name consitence by adding 'Support' or 'Dummy' at start of util or dummy type of test classes Issue-ID: POLICY-1258 Change-Id: Idea946375ee46f14512d4c4bc29e65adaa4d2b37 Signed-off-by: Parshad Patel <pars.patel@samsung.com>
-rw-r--r--controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/ActorServiceProviderTest.java16
-rw-r--r--controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/DummyActor.java (renamed from controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/TestActor.java)2
-rw-r--r--controlloop/common/actors/actorServiceProvider/src/test/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor2
-rw-r--r--controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/SupportUtil.java (renamed from controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/Util.java)2
-rw-r--r--controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManagerTest.java8
-rw-r--r--controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManagerTest.java6
-rw-r--r--controlloop/common/guard/src/test/java/org/onap/policy/guard/GuardUtilTest.java4
-rw-r--r--controlloop/common/guard/src/test/java/org/onap/policy/guard/PolicyGuardYamlToXacmlTest.java16
-rw-r--r--controlloop/common/guard/src/test/java/org/onap/policy/guard/SupportTextFileUtils.java (renamed from controlloop/common/guard/src/test/java/org/onap/policy/guard/TextFileUtils.java)2
-rw-r--r--controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopCoordinationTest.java14
-rw-r--r--controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopEventCleanupTest.java34
-rw-r--r--controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopParamsCleanupTest.java20
-rw-r--r--controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/SupportUtil.java (renamed from controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/Util.java)4
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnControlLoopTest.java14
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopEventCleanupTest.java34
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopFailureTest.java16
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopParamsCleanupTest.java28
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/SupportUtil.java (renamed from controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/Util.java)4
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VcpeControlLoopTest.java16
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VdnsControlLoopTest.java20
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfcControlLoopTest.java20
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfwControlLoopTest.java16
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VpciControlLoopTest.java16
23 files changed, 157 insertions, 157 deletions
diff --git a/controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/ActorServiceProviderTest.java b/controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/ActorServiceProviderTest.java
index a70216d1e..4e50d855f 100644
--- a/controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/ActorServiceProviderTest.java
+++ b/controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/ActorServiceProviderTest.java
@@ -38,16 +38,16 @@ public class ActorServiceProviderTest {
actorService = ActorService.getInstance();
assertNotNull(actorService);
- Actor testActor = ActorService.getInstance().actors().get(0);
- assertNotNull(testActor);
+ Actor dummyActor = ActorService.getInstance().actors().get(0);
+ assertNotNull(dummyActor);
- assertEquals("TestActor", testActor.actor());
+ assertEquals("DummyActor", dummyActor.actor());
- assertEquals(2, testActor.recipes().size());
- assertEquals("Dorothy", testActor.recipes().get(0));
- assertEquals("Wizard", testActor.recipes().get(1));
+ assertEquals(2, dummyActor.recipes().size());
+ assertEquals("Dorothy", dummyActor.recipes().get(0));
+ assertEquals("Wizard", dummyActor.recipes().get(1));
- assertEquals(2, testActor.recipeTargets("Dorothy").size());
- assertEquals(2, testActor.recipePayloads("Dorothy").size());
+ assertEquals(2, dummyActor.recipeTargets("Dorothy").size());
+ assertEquals(2, dummyActor.recipePayloads("Dorothy").size());
}
}
diff --git a/controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/TestActor.java b/controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/DummyActor.java
index af04cc138..2e8512411 100644
--- a/controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/TestActor.java
+++ b/controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/DummyActor.java
@@ -25,7 +25,7 @@ import java.util.List;
import org.onap.policy.controlloop.actorserviceprovider.spi.Actor;
-public class TestActor implements Actor {
+public class DummyActor implements Actor {
@Override
public String actor() {
return this.getClass().getSimpleName();
diff --git a/controlloop/common/actors/actorServiceProvider/src/test/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor b/controlloop/common/actors/actorServiceProvider/src/test/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
index a15871456..2a4bb5749 100644
--- a/controlloop/common/actors/actorServiceProvider/src/test/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
+++ b/controlloop/common/actors/actorServiceProvider/src/test/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
@@ -1 +1 @@
-org.onap.policy.controlloop.actorserviceprovider.TestActor \ No newline at end of file
+org.onap.policy.controlloop.actorserviceprovider.DummyActor \ No newline at end of file
diff --git a/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/Util.java b/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/SupportUtil.java
index ced419a04..39077e3b3 100644
--- a/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/Util.java
+++ b/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/SupportUtil.java
@@ -33,7 +33,7 @@ import org.onap.policy.controlloop.policy.ControlLoopPolicy;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.Constructor;
-public final class Util {
+public final class SupportUtil {
public static class Pair<A, B> {
public final A key;
diff --git a/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManagerTest.java b/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManagerTest.java
index 1673df3be..49a6258c1 100644
--- a/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManagerTest.java
+++ b/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManagerTest.java
@@ -58,7 +58,7 @@ import org.onap.policy.common.utils.io.Serializer;
import org.onap.policy.controlloop.ControlLoopEventStatus;
import org.onap.policy.controlloop.ControlLoopException;
import org.onap.policy.controlloop.ControlLoopNotificationType;
-import org.onap.policy.controlloop.Util;
+import org.onap.policy.controlloop.SupportUtil;
import org.onap.policy.controlloop.VirtualControlLoopEvent;
import org.onap.policy.controlloop.VirtualControlLoopNotification;
import org.onap.policy.controlloop.eventmanager.ControlLoopEventManager.NEW_EVENT_STATUS;
@@ -124,7 +124,7 @@ public class ControlLoopEventManagerTest {
@Test
public void testAaiVnfInfo() {
- final Util.Pair<ControlLoopPolicy, String> pair = Util.loadYaml("src/test/resources/test.yaml");
+ final SupportUtil.Pair<ControlLoopPolicy, String> pair = SupportUtil.loadYaml("src/test/resources/test.yaml");
onset.setClosedLoopControlName(pair.key.getControlLoop().getControlLoopName());
try {
AaiGetVnfResponse response = getQueryByVnfId2(
@@ -143,7 +143,7 @@ public class ControlLoopEventManagerTest {
@Test
public void testAaiVnfInfo2() {
- final Util.Pair<ControlLoopPolicy, String> pair = Util.loadYaml("src/test/resources/test.yaml");
+ final SupportUtil.Pair<ControlLoopPolicy, String> pair = SupportUtil.loadYaml("src/test/resources/test.yaml");
onset.setClosedLoopControlName(pair.key.getControlLoop().getControlLoopName());
try {
AaiGetVnfResponse response = getQueryByVnfName2(
@@ -161,7 +161,7 @@ public class ControlLoopEventManagerTest {
@Test
public void testAaiVserver() {
- final Util.Pair<ControlLoopPolicy, String> pair = Util.loadYaml("src/test/resources/test.yaml");
+ final SupportUtil.Pair<ControlLoopPolicy, String> pair = SupportUtil.loadYaml("src/test/resources/test.yaml");
onset.setClosedLoopControlName(pair.key.getControlLoop().getControlLoopName());
try {
AaiGetVserverResponse response = getQueryByVserverName2(
diff --git a/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManagerTest.java b/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManagerTest.java
index dae03aa6e..0afe9d2d3 100644
--- a/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManagerTest.java
+++ b/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManagerTest.java
@@ -61,7 +61,7 @@ import org.onap.policy.controlloop.ControlLoopEventStatus;
import org.onap.policy.controlloop.ControlLoopException;
import org.onap.policy.controlloop.ControlLoopNotificationType;
import org.onap.policy.controlloop.ControlLoopTargetType;
-import org.onap.policy.controlloop.Util;
+import org.onap.policy.controlloop.SupportUtil;
import org.onap.policy.controlloop.VirtualControlLoopEvent;
import org.onap.policy.controlloop.VirtualControlLoopNotification;
import org.onap.policy.controlloop.policy.ControlLoopPolicy;
@@ -161,7 +161,7 @@ public class ControlLoopOperationManagerTest {
//
// Load up the policy
//
- final Util.Pair<ControlLoopPolicy, String> pair = Util.loadYaml("src/test/resources/test.yaml");
+ final SupportUtil.Pair<ControlLoopPolicy, String> pair = SupportUtil.loadYaml("src/test/resources/test.yaml");
onset.setClosedLoopControlName(pair.key.getControlLoop().getControlLoopName());
try {
//
@@ -292,7 +292,7 @@ public class ControlLoopOperationManagerTest {
//
// Load up the policy
//
- final Util.Pair<ControlLoopPolicy, String> pair = Util.loadYaml("src/test/resources/test.yaml");
+ final SupportUtil.Pair<ControlLoopPolicy, String> pair = SupportUtil.loadYaml("src/test/resources/test.yaml");
onset.setClosedLoopControlName(pair.key.getControlLoop().getControlLoopName());
try {
//
diff --git a/controlloop/common/guard/src/test/java/org/onap/policy/guard/GuardUtilTest.java b/controlloop/common/guard/src/test/java/org/onap/policy/guard/GuardUtilTest.java
index 8fc5a83da..1f7002a7d 100644
--- a/controlloop/common/guard/src/test/java/org/onap/policy/guard/GuardUtilTest.java
+++ b/controlloop/common/guard/src/test/java/org/onap/policy/guard/GuardUtilTest.java
@@ -45,7 +45,7 @@ public class GuardUtilTest {
Yaml clYaml = new Yaml(new Constructor(ControlLoopPolicy.class));
String clYamlString = clYaml.dump(clPolicy);
- TextFileUtils.putStringAsFile(clYamlString, tempYamlFile);
+ SupportTextFileUtils.putStringAsFile(clYamlString, tempYamlFile);
Pair<ControlLoopPolicy, String> result = Util.loadYaml(tempYamlFile.getCanonicalPath());
@@ -74,7 +74,7 @@ public class GuardUtilTest {
Yaml clYaml = new Yaml(new Constructor(ControlLoopPolicy.class));
String clYamlString = clYaml.dump(clGuardPolicy);
- TextFileUtils.putStringAsFile(clYamlString, tempYamlFile);
+ SupportTextFileUtils.putStringAsFile(clYamlString, tempYamlFile);
ControlLoopGuard result = Util.loadYamlGuard(tempYamlFile.getCanonicalPath());
diff --git a/controlloop/common/guard/src/test/java/org/onap/policy/guard/PolicyGuardYamlToXacmlTest.java b/controlloop/common/guard/src/test/java/org/onap/policy/guard/PolicyGuardYamlToXacmlTest.java
index 3b517bcc1..dced2889d 100644
--- a/controlloop/common/guard/src/test/java/org/onap/policy/guard/PolicyGuardYamlToXacmlTest.java
+++ b/controlloop/common/guard/src/test/java/org/onap/policy/guard/PolicyGuardYamlToXacmlTest.java
@@ -86,11 +86,11 @@ public class PolicyGuardYamlToXacmlTest {
Yaml clYaml = new Yaml(new Constructor(ControlLoopGuard.class));
String clYamlString = clYaml.dump(clGuard);
- TextFileUtils.putStringAsFile(clYamlString, tempYamlFile);
+ SupportTextFileUtils.putStringAsFile(clYamlString, tempYamlFile);
PolicyGuardYamlToXacml.fromYamlToXacml(tempYamlFile.getCanonicalPath(),
tempXacmlTemplateFile.getCanonicalPath(), tempXacmlOutputFile.getCanonicalPath());
- String result = TextFileUtils.getTextFileAsString(tempXacmlOutputFile.getCanonicalPath());
+ String result = SupportTextFileUtils.getTextFileAsString(tempXacmlOutputFile.getCanonicalPath());
// Assert no mote "${}" are left
assertFalse(result.contains("${"));
@@ -124,11 +124,11 @@ public class PolicyGuardYamlToXacmlTest {
Yaml clYaml = new Yaml(new Constructor(ControlLoopGuard.class));
String clYamlString = clYaml.dump(clGuard);
- TextFileUtils.putStringAsFile(clYamlString, tempYamlFile);
+ SupportTextFileUtils.putStringAsFile(clYamlString, tempYamlFile);
PolicyGuardYamlToXacml.fromYamlToXacml(tempYamlFile.getCanonicalPath(),
tempXacmlTemplateFile.getCanonicalPath(), tempXacmlOutputFile.getCanonicalPath());
- String result = TextFileUtils.getTextFileAsString(tempXacmlOutputFile.getCanonicalPath());
+ String result = SupportTextFileUtils.getTextFileAsString(tempXacmlOutputFile.getCanonicalPath());
// Assert no mote "${}" are left
assertFalse(result.contains("${"));
@@ -184,11 +184,11 @@ public class PolicyGuardYamlToXacmlTest {
Yaml clYaml = new Yaml(new Constructor(ControlLoopGuard.class));
String clYamlString = clYaml.dump(clGuard);
- TextFileUtils.putStringAsFile(clYamlString, tempYamlFile);
+ SupportTextFileUtils.putStringAsFile(clYamlString, tempYamlFile);
PolicyGuardYamlToXacml.fromYamlToXacmlBlacklist(tempYamlFile.getCanonicalPath(),
tempXacmlTemplateFile.getCanonicalPath(), tempXacmlOutputFile.getCanonicalPath());
- String result = TextFileUtils.getTextFileAsString(tempXacmlOutputFile.getCanonicalPath());
+ String result = SupportTextFileUtils.getTextFileAsString(tempXacmlOutputFile.getCanonicalPath());
System.err.println(result);
// Assert no mote "${}" are left
assertFalse(result.contains("${"));
@@ -220,11 +220,11 @@ public class PolicyGuardYamlToXacmlTest {
Yaml clYaml = new Yaml(new Constructor(ControlLoopGuard.class));
String clYamlString = clYaml.dump(clGuard);
- TextFileUtils.putStringAsFile(clYamlString, tempYamlFile);
+ SupportTextFileUtils.putStringAsFile(clYamlString, tempYamlFile);
PolicyGuardYamlToXacml.fromYamlToXacmlBlacklist(tempYamlFile.getCanonicalPath(),
tempXacmlTemplateFile.getCanonicalPath(), tempXacmlOutputFile.getCanonicalPath());
- String result = TextFileUtils.getTextFileAsString(tempXacmlOutputFile.getCanonicalPath());
+ String result = SupportTextFileUtils.getTextFileAsString(tempXacmlOutputFile.getCanonicalPath());
System.err.println(result);
// Assert no mote "${}" are left
assertFalse(result.contains("${"));
diff --git a/controlloop/common/guard/src/test/java/org/onap/policy/guard/TextFileUtils.java b/controlloop/common/guard/src/test/java/org/onap/policy/guard/SupportTextFileUtils.java
index 46a2762cc..03260ada9 100644
--- a/controlloop/common/guard/src/test/java/org/onap/policy/guard/TextFileUtils.java
+++ b/controlloop/common/guard/src/test/java/org/onap/policy/guard/SupportTextFileUtils.java
@@ -31,7 +31,7 @@ import java.io.IOException;
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
-public abstract class TextFileUtils {
+public abstract class SupportTextFileUtils {
/**
* Method to return the contents of a text file as a string.
*
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 588d00563..d4af9ea4d 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
@@ -82,9 +82,9 @@ public class ControlLoopCoordinationTest implements TopicListener {
static {
/* Set environment properties */
- Util.setAaiProps();
- Util.setGuardPropsEmbedded();
- Util.setPuProp();
+ SupportUtil.setAaiProps();
+ SupportUtil.setGuardPropsEmbedded();
+ SupportUtil.setPuProp();
}
/**
@@ -124,7 +124,7 @@ public class ControlLoopCoordinationTest implements TopicListener {
.customJacksonCoder(null)
.modelClassLoaderHash(1111));
try {
- Util.buildAaiSim();
+ SupportUtil.buildAaiSim();
} catch (Exception e) {
fail(e.getMessage());
}
@@ -244,7 +244,7 @@ public class ControlLoopCoordinationTest implements TopicListener {
//
// get dump of database entries and log
//
- List<?> entries = Util.dumpDb();
+ List<?> entries = SupportUtil.dumpDb();
assertNotNull(entries);
logger.debug("dumpDB, {} entries", entries.size());
for (Object entry : entries) {
@@ -307,7 +307,7 @@ public class ControlLoopCoordinationTest implements TopicListener {
/*
* Load policies from yaml
*/
- Util.Pair<ControlLoopPolicy, String> pair = Util.loadYaml(yamlFile);
+ SupportUtil.Pair<ControlLoopPolicy, String> pair = SupportUtil.loadYaml(yamlFile);
assertNotNull(pair);
assertNotNull(pair.first);
assertNotNull(pair.first.getControlLoop());
@@ -320,7 +320,7 @@ public class ControlLoopCoordinationTest implements TopicListener {
/*
* Construct a kie session
*/
- final KieSession kieSession = Util.buildContainer(droolsTemplate,
+ final KieSession kieSession = SupportUtil.buildContainer(droolsTemplate,
controlLoopName.toString(),
policyScope,
policyName,
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 ef5fac693..e034990fe 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
@@ -52,7 +52,7 @@ import org.onap.policy.drools.protocol.coders.JsonProtocolFilter;
import org.onap.policy.drools.system.PolicyController;
import org.onap.policy.drools.system.PolicyEngine;
import org.onap.policy.drools.utils.logging.LoggerUtil;
-import org.onap.policy.template.demo.clc.Util.Pair;
+import org.onap.policy.template.demo.clc.SupportUtil.Pair;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -97,7 +97,7 @@ public class ControlLoopEventCleanupTest {
private static String saveGuardFlag;
private static KieSession kieSession;
- private static Util.RuleSpec[] specifications;
+ private static SupportUtil.RuleSpec[] specifications;
/**
* Setup the simulator.
@@ -109,7 +109,7 @@ public class ControlLoopEventCleanupTest {
saveGuardFlag = PolicyEngine.manager.getEnvironmentProperty(GUARD_DISABLED);
PolicyEngine.manager.getEnvironment().setProperty(GUARD_DISABLED, "true");
- Util.setAaiProps();
+ SupportUtil.setAaiProps();
PolicyEngine.manager.configure(new Properties());
assertTrue(PolicyEngine.manager.start());
@@ -144,7 +144,7 @@ public class ControlLoopEventCleanupTest {
.modelClassLoaderHash(1111));
try {
- Util.buildAaiSim();
+ SupportUtil.buildAaiSim();
} catch (Exception e) {
logger.error("Could not create simulator", e);
@@ -156,15 +156,15 @@ public class ControlLoopEventCleanupTest {
}
try {
- specifications = new Util.RuleSpec[2];
+ specifications = new SupportUtil.RuleSpec[2];
- specifications[0] = new Util.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME, POLICY_SCOPE, POLICY_NAME,
+ specifications[0] = new SupportUtil.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME, POLICY_SCOPE, POLICY_NAME,
POLICY_VERSION, loadYaml(YAML));
- specifications[1] = new Util.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME_B, POLICY_SCOPE, POLICY_NAME_B,
- POLICY_VERSION, loadYaml(YAML_B));
+ specifications[1] = new SupportUtil.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME_B, POLICY_SCOPE,
+ POLICY_NAME_B, POLICY_VERSION, loadYaml(YAML_B));
- kieSession = Util.buildContainer(POLICY_VERSION, specifications);
+ kieSession = SupportUtil.buildContainer(POLICY_VERSION, specifications);
} catch (IOException e) {
logger.error("Could not create kieSession", e);
@@ -269,17 +269,17 @@ public class ControlLoopEventCleanupTest {
* effect, so then we'll update the second rule set, which should trigger a
* clean-up of both.
*/
- Util.RuleSpec[] specs = new Util.RuleSpec[1];
+ SupportUtil.RuleSpec[] specs = new SupportUtil.RuleSpec[1];
specs[0] = specifications[1];
logger.info("UPDATING VERSION TO v5.0 - DELETED RULE SET");
- Util.updateContainer("v5.0", specs);
+ SupportUtil.updateContainer("v5.0", specs);
- specs[0] = new Util.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME_B, POLICY_SCOPE, POLICY_NAME_B, POLICY_VERSION,
- loadYaml(YAML));
+ specs[0] = new SupportUtil.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME_B, POLICY_SCOPE, POLICY_NAME_B,
+ POLICY_VERSION, loadYaml(YAML));
logger.info("UPDATING VERSION TO v6.0 - UPDATED SECOND RULE SET");
- Util.updateContainer("v6.0", specs);
+ SupportUtil.updateContainer("v6.0", specs);
kieSession.fireAllRules();
facts = getSessionObjects();
@@ -298,13 +298,13 @@ public class ControlLoopEventCleanupTest {
*/
private static void updatePolicy(String yamlFile, String policyVersion) throws IOException {
- specifications[0] = new Util.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME, POLICY_SCOPE, POLICY_NAME,
+ specifications[0] = new SupportUtil.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME, POLICY_SCOPE, POLICY_NAME,
policyVersion, loadYaml(yamlFile));
/*
* Update the policy within the container.
*/
- Util.updateContainer(policyVersion, specifications);
+ SupportUtil.updateContainer(policyVersion, specifications);
}
/**
@@ -315,7 +315,7 @@ public class ControlLoopEventCleanupTest {
* @throws UnsupportedEncodingException if an error occurs
*/
private static String loadYaml(String yamlFile) throws UnsupportedEncodingException {
- Pair<ControlLoopPolicy, String> pair = Util.loadYaml(yamlFile);
+ Pair<ControlLoopPolicy, String> pair = SupportUtil.loadYaml(yamlFile);
assertNotNull(pair);
assertNotNull(pair.first);
assertNotNull(pair.first.getControlLoop());
diff --git a/controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopParamsCleanupTest.java b/controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopParamsCleanupTest.java
index 257aeb350..e0696abff 100644
--- a/controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopParamsCleanupTest.java
+++ b/controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopParamsCleanupTest.java
@@ -37,7 +37,7 @@ import org.junit.Test;
import org.kie.api.runtime.KieSession;
import org.onap.policy.controlloop.policy.ControlLoopPolicy;
import org.onap.policy.drools.utils.logging.LoggerUtil;
-import org.onap.policy.template.demo.clc.Util.Pair;
+import org.onap.policy.template.demo.clc.SupportUtil.Pair;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -73,7 +73,7 @@ public class ControlLoopParamsCleanupTest {
private static final String CONTROL_LOOP_NAME_B = "ControlLoop-Params-Cleanup-Test-B";
private static KieSession kieSession;
- private static Util.RuleSpec[] specifications;
+ private static SupportUtil.RuleSpec[] specifications;
/**
* Setup the simulator.
@@ -83,15 +83,15 @@ public class ControlLoopParamsCleanupTest {
LoggerUtil.setLevel(LoggerUtil.ROOT_LOGGER, "INFO");
try {
- specifications = new Util.RuleSpec[2];
+ specifications = new SupportUtil.RuleSpec[2];
- specifications[0] = new Util.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME, POLICY_SCOPE, POLICY_NAME,
+ specifications[0] = new SupportUtil.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME, POLICY_SCOPE, POLICY_NAME,
POLICY_VERSION, loadYaml(YAML));
- specifications[1] = new Util.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME_B, POLICY_SCOPE, POLICY_NAME_B,
- POLICY_VERSION, loadYaml(YAML_B));
+ specifications[1] = new SupportUtil.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME_B, POLICY_SCOPE,
+ POLICY_NAME_B, POLICY_VERSION, loadYaml(YAML_B));
- kieSession = Util.buildContainer(POLICY_VERSION, specifications);
+ kieSession = SupportUtil.buildContainer(POLICY_VERSION, specifications);
} catch (IOException e) {
logger.error("Could not create kieSession", e);
@@ -189,13 +189,13 @@ public class ControlLoopParamsCleanupTest {
*/
private static void updatePolicy(String yamlFile, String policyVersion) throws IOException {
- specifications[0] = new Util.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME, POLICY_SCOPE, POLICY_NAME,
+ specifications[0] = new SupportUtil.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME, POLICY_SCOPE, POLICY_NAME,
policyVersion, loadYaml(yamlFile));
/*
* Update the policy within the container.
*/
- Util.updateContainer(policyVersion, specifications);
+ SupportUtil.updateContainer(policyVersion, specifications);
}
/**
@@ -206,7 +206,7 @@ public class ControlLoopParamsCleanupTest {
* @throws UnsupportedEncodingException if an error occurs
*/
private static String loadYaml(String yamlFile) throws UnsupportedEncodingException {
- Pair<ControlLoopPolicy, String> pair = Util.loadYaml(yamlFile);
+ Pair<ControlLoopPolicy, String> pair = SupportUtil.loadYaml(yamlFile);
assertNotNull(pair);
assertNotNull(pair.first);
assertNotNull(pair.first.getControlLoop());
diff --git a/controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/Util.java b/controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/SupportUtil.java
index 1d105911c..bf2038cc2 100644
--- a/controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/Util.java
+++ b/controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/SupportUtil.java
@@ -56,10 +56,10 @@ import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.Constructor;
-public final class Util {
+public final class SupportUtil {
private static final String OPSHISTPUPROP = "OperationsHistoryPU";
- private static final Logger logger = LoggerFactory.getLogger(Util.class);
+ private static final Logger logger = LoggerFactory.getLogger(SupportUtil.class);
// values from the last call to buildContainer()
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnControlLoopTest.java
index 7469fdc75..b64ec589a 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnControlLoopTest.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnControlLoopTest.java
@@ -65,12 +65,12 @@ public class CcvpnControlLoopTest implements TopicListener {
private static List<? extends TopicSink> noopTopics;
private static KieSession kieSession;
- private static Util.Pair<ControlLoopPolicy, String> pair;
+ private static SupportUtil.Pair<ControlLoopPolicy, String> pair;
static {
/* Set environment properties */
- Util.setAaiProps();
- Util.setSdncProps();
+ SupportUtil.setAaiProps();
+ SupportUtil.setSdncProps();
LoggerUtil.setLevel(LoggerUtil.ROOT_LOGGER, "INFO");
}
@@ -100,8 +100,8 @@ public class CcvpnControlLoopTest implements TopicListener {
.modelClassLoaderHash(1111));
try {
- Util.buildAaiSim();
- Util.buildSdncSim();
+ SupportUtil.buildAaiSim();
+ SupportUtil.buildSdncSim();
} catch (Exception e) {
fail(e.getMessage());
}
@@ -237,7 +237,7 @@ public class CcvpnControlLoopTest implements TopicListener {
/*
* Load policies from yaml
*/
- pair = Util.loadYaml(yamlFile);
+ pair = SupportUtil.loadYaml(yamlFile);
assertNotNull(pair);
assertNotNull(pair.first);
assertNotNull(pair.first.getControlLoop());
@@ -247,7 +247,7 @@ public class CcvpnControlLoopTest implements TopicListener {
/*
* Construct a kie session
*/
- final KieSession kieSession = Util.buildContainer(droolsTemplate,
+ final KieSession kieSession = SupportUtil.buildContainer(droolsTemplate,
pair.first.getControlLoop().getControlLoopName(),
policyScope, policyName, policyVersion, URLEncoder.encode(pair.second, "UTF-8"));
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopEventCleanupTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopEventCleanupTest.java
index 0713a2800..aea2d08d0 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopEventCleanupTest.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopEventCleanupTest.java
@@ -52,7 +52,7 @@ import org.onap.policy.drools.protocol.coders.JsonProtocolFilter;
import org.onap.policy.drools.system.PolicyController;
import org.onap.policy.drools.system.PolicyEngine;
import org.onap.policy.drools.utils.logging.LoggerUtil;
-import org.onap.policy.template.demo.Util.Pair;
+import org.onap.policy.template.demo.SupportUtil.Pair;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -98,7 +98,7 @@ public class ControlLoopEventCleanupTest {
private static String saveGuardFlag;
private static KieSession kieSession;
- private static Util.RuleSpec[] specifications;
+ private static SupportUtil.RuleSpec[] specifications;
/**
* Setup the simulator.
@@ -110,7 +110,7 @@ public class ControlLoopEventCleanupTest {
saveGuardFlag = PolicyEngine.manager.getEnvironmentProperty(GUARD_DISABLED);
PolicyEngine.manager.getEnvironment().setProperty(GUARD_DISABLED, "true");
- Util.setAaiProps();
+ SupportUtil.setAaiProps();
PolicyEngine.manager.configure(new Properties());
assertTrue(PolicyEngine.manager.start());
@@ -145,7 +145,7 @@ public class ControlLoopEventCleanupTest {
.modelClassLoaderHash(1111));
try {
- Util.buildAaiSim();
+ SupportUtil.buildAaiSim();
} catch (Exception e) {
logger.error("Could not create simulator", e);
@@ -157,15 +157,15 @@ public class ControlLoopEventCleanupTest {
}
try {
- specifications = new Util.RuleSpec[2];
+ specifications = new SupportUtil.RuleSpec[2];
- specifications[0] = new Util.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME, POLICY_SCOPE, POLICY_NAME,
+ specifications[0] = new SupportUtil.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME, POLICY_SCOPE, POLICY_NAME,
POLICY_VERSION, loadYaml(YAML));
- specifications[1] = new Util.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME_B, POLICY_SCOPE, POLICY_NAME_B,
- POLICY_VERSION, loadYaml(YAML_B));
+ specifications[1] = new SupportUtil.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME_B, POLICY_SCOPE,
+ POLICY_NAME_B, POLICY_VERSION, loadYaml(YAML_B));
- kieSession = Util.buildContainer(POLICY_VERSION, specifications);
+ kieSession = SupportUtil.buildContainer(POLICY_VERSION, specifications);
} catch (IOException e) {
logger.error("Could not create kieSession", e);
@@ -270,17 +270,17 @@ public class ControlLoopEventCleanupTest {
* effect, so then we'll update the second rule set, which should trigger a
* clean-up of both.
*/
- Util.RuleSpec[] specs = new Util.RuleSpec[1];
+ SupportUtil.RuleSpec[] specs = new SupportUtil.RuleSpec[1];
specs[0] = specifications[1];
logger.info("UPDATING VERSION TO v5.0 - DELETED RULE SET");
- Util.updateContainer("v5.0", specs);
+ SupportUtil.updateContainer("v5.0", specs);
- specs[0] = new Util.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME_B, POLICY_SCOPE, POLICY_NAME_B, POLICY_VERSION,
- loadYaml(YAML));
+ specs[0] = new SupportUtil.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME_B, POLICY_SCOPE, POLICY_NAME_B,
+ POLICY_VERSION, loadYaml(YAML));
logger.info("UPDATING VERSION TO v6.0 - UPDATED SECOND RULE SET");
- Util.updateContainer("v6.0", specs);
+ SupportUtil.updateContainer("v6.0", specs);
kieSession.fireAllRules();
facts = getSessionObjects();
@@ -299,13 +299,13 @@ public class ControlLoopEventCleanupTest {
*/
private static void updatePolicy(String yamlFile, String policyVersion) throws IOException {
- specifications[0] = new Util.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME, POLICY_SCOPE, POLICY_NAME,
+ specifications[0] = new SupportUtil.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME, POLICY_SCOPE, POLICY_NAME,
policyVersion, loadYaml(yamlFile));
/*
* Update the policy within the container.
*/
- Util.updateContainer(policyVersion, specifications);
+ SupportUtil.updateContainer(policyVersion, specifications);
}
/**
@@ -316,7 +316,7 @@ public class ControlLoopEventCleanupTest {
* @throws UnsupportedEncodingException if an error occurs
*/
private static String loadYaml(String yamlFile) throws UnsupportedEncodingException {
- Pair<ControlLoopPolicy, String> pair = Util.loadYaml(yamlFile);
+ Pair<ControlLoopPolicy, String> pair = SupportUtil.loadYaml(yamlFile);
assertNotNull(pair);
assertNotNull(pair.first);
assertNotNull(pair.first.getControlLoop());
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopFailureTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopFailureTest.java
index 112d4df93..86e7d6de8 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopFailureTest.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopFailureTest.java
@@ -68,7 +68,7 @@ public class ControlLoopFailureTest implements TopicListener {
private static List<? extends TopicSink> noopTopics;
private static KieSession kieSession;
- private static Util.Pair<ControlLoopPolicy, String> pair;
+ private static SupportUtil.Pair<ControlLoopPolicy, String> pair;
private UUID requestId;
private UUID requestId2;
private UUID requestId3;
@@ -76,9 +76,9 @@ public class ControlLoopFailureTest implements TopicListener {
static {
/* Set environment properties */
- Util.setAaiProps();
- Util.setGuardProps();
- Util.setPuProp();
+ SupportUtil.setAaiProps();
+ SupportUtil.setGuardProps();
+ SupportUtil.setPuProp();
}
/**
@@ -118,8 +118,8 @@ public class ControlLoopFailureTest implements TopicListener {
.customJacksonCoder(null)
.modelClassLoaderHash(1111));
try {
- Util.buildAaiSim();
- Util.buildGuardSim();
+ SupportUtil.buildAaiSim();
+ SupportUtil.buildGuardSim();
} catch (Exception e) {
fail(e.getMessage());
}
@@ -242,7 +242,7 @@ public class ControlLoopFailureTest implements TopicListener {
/*
* Load policies from yaml
*/
- pair = Util.loadYaml(yamlFile);
+ pair = SupportUtil.loadYaml(yamlFile);
assertNotNull(pair);
assertNotNull(pair.first);
assertNotNull(pair.first.getControlLoop());
@@ -252,7 +252,7 @@ public class ControlLoopFailureTest implements TopicListener {
/*
* Construct a kie session
*/
- final KieSession kieSession = Util.buildContainer(droolsTemplate,
+ final KieSession kieSession = SupportUtil.buildContainer(droolsTemplate,
pair.first.getControlLoop().getControlLoopName(),
policyScope, policyName, policyVersion, URLEncoder.encode(pair.second, "UTF-8"));
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopParamsCleanupTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopParamsCleanupTest.java
index f3c6e058d..6dc9c1c14 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopParamsCleanupTest.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopParamsCleanupTest.java
@@ -37,7 +37,7 @@ import org.junit.Test;
import org.kie.api.runtime.KieSession;
import org.onap.policy.controlloop.policy.ControlLoopPolicy;
import org.onap.policy.drools.utils.logging.LoggerUtil;
-import org.onap.policy.template.demo.Util.Pair;
+import org.onap.policy.template.demo.SupportUtil.Pair;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -74,7 +74,7 @@ public class ControlLoopParamsCleanupTest {
private static final String CONTROL_LOOP_NAME_B = "ControlLoop-Params-Cleanup-Test-B";
private static KieSession kieSession;
- private static Util.RuleSpec[] specifications;
+ private static SupportUtil.RuleSpec[] specifications;
/**
* Setup the simulator.
@@ -84,15 +84,15 @@ public class ControlLoopParamsCleanupTest {
LoggerUtil.setLevel(LoggerUtil.ROOT_LOGGER, "INFO");
try {
- specifications = new Util.RuleSpec[2];
+ specifications = new SupportUtil.RuleSpec[2];
- specifications[0] = new Util.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME, POLICY_SCOPE, POLICY_NAME,
+ specifications[0] = new SupportUtil.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME, POLICY_SCOPE, POLICY_NAME,
POLICY_VERSION, loadYaml(YAML));
- specifications[1] = new Util.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME_B, POLICY_SCOPE, POLICY_NAME_B,
- POLICY_VERSION, loadYaml(YAML_B));
+ specifications[1] = new SupportUtil.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME_B, POLICY_SCOPE,
+ POLICY_NAME_B, POLICY_VERSION, loadYaml(YAML_B));
- kieSession = Util.buildContainer(POLICY_VERSION, specifications);
+ kieSession = SupportUtil.buildContainer(POLICY_VERSION, specifications);
} catch (IOException e) {
logger.error("Could not create kieSession", e);
@@ -185,17 +185,17 @@ public class ControlLoopParamsCleanupTest {
* effect, so then we'll update the second rule set, which should trigger a
* clean-up of both.
*/
- Util.RuleSpec[] specs = new Util.RuleSpec[1];
+ SupportUtil.RuleSpec[] specs = new SupportUtil.RuleSpec[1];
specs[0] = specifications[1];
logger.info("UPDATING VERSION TO v5.0 - DELETED RULE SET");
- Util.updateContainer("v5.0", specs);
+ SupportUtil.updateContainer("v5.0", specs);
- specs[0] = new Util.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME_B, POLICY_SCOPE, POLICY_NAME_B,
+ specs[0] = new SupportUtil.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME_B, POLICY_SCOPE, POLICY_NAME_B,
POLICY_VERSION, loadYaml(YAML));
logger.info("UPDATING VERSION TO v6.0 - UPDATED SECOND RULE SET");
- Util.updateContainer("v6.0", specs);
+ SupportUtil.updateContainer("v6.0", specs);
kieSession.fireAllRules();
facts = getSessionObjects();
@@ -213,13 +213,13 @@ public class ControlLoopParamsCleanupTest {
*/
private static void updatePolicy(String yamlFile, String policyVersion) throws IOException {
- specifications[0] = new Util.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME, POLICY_SCOPE, POLICY_NAME,
+ specifications[0] = new SupportUtil.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME, POLICY_SCOPE, POLICY_NAME,
policyVersion, loadYaml(yamlFile));
/*
* Update the policy within the container.
*/
- Util.updateContainer(policyVersion, specifications);
+ SupportUtil.updateContainer(policyVersion, specifications);
}
/**
@@ -230,7 +230,7 @@ public class ControlLoopParamsCleanupTest {
* @throws UnsupportedEncodingException if an error occurs
*/
private static String loadYaml(String yamlFile) throws UnsupportedEncodingException {
- Pair<ControlLoopPolicy, String> pair = Util.loadYaml(yamlFile);
+ Pair<ControlLoopPolicy, String> pair = SupportUtil.loadYaml(yamlFile);
assertNotNull(pair);
assertNotNull(pair.first);
assertNotNull(pair.first.getControlLoop());
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/Util.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/SupportUtil.java
index 758c65568..00949599e 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/Util.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/SupportUtil.java
@@ -54,10 +54,10 @@ import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.Constructor;
-public final class Util {
+public final class SupportUtil {
private static final String OPSHISTPUPROP = "OperationsHistoryPU";
- private static final Logger logger = LoggerFactory.getLogger(Util.class);
+ private static final Logger logger = LoggerFactory.getLogger(SupportUtil.class);
public static class Pair<A, B> {
public final A first;
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VcpeControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VcpeControlLoopTest.java
index c6d6dc082..02b35fadb 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VcpeControlLoopTest.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VcpeControlLoopTest.java
@@ -70,14 +70,14 @@ public class VcpeControlLoopTest implements TopicListener {
private static List<? extends TopicSink> noopTopics;
private static KieSession kieSession;
- private static Util.Pair<ControlLoopPolicy, String> pair;
+ private static SupportUtil.Pair<ControlLoopPolicy, String> pair;
private UUID requestId;
static {
/* Set environment properties */
- Util.setAaiProps();
- Util.setGuardProps();
- Util.setPuProp();
+ SupportUtil.setAaiProps();
+ SupportUtil.setGuardProps();
+ SupportUtil.setPuProp();
LoggerUtil.setLevel(LoggerUtil.ROOT_LOGGER, "INFO");
}
@@ -118,8 +118,8 @@ public class VcpeControlLoopTest implements TopicListener {
.customJacksonCoder(null)
.modelClassLoaderHash(1111));
try {
- Util.buildAaiSim();
- Util.buildGuardSim();
+ SupportUtil.buildAaiSim();
+ SupportUtil.buildGuardSim();
} catch (Exception e) {
fail(e.getMessage());
}
@@ -253,7 +253,7 @@ public class VcpeControlLoopTest implements TopicListener {
/*
* Load policies from yaml
*/
- pair = Util.loadYaml(yamlFile);
+ pair = SupportUtil.loadYaml(yamlFile);
assertNotNull(pair);
assertNotNull(pair.first);
assertNotNull(pair.first.getControlLoop());
@@ -263,7 +263,7 @@ public class VcpeControlLoopTest implements TopicListener {
/*
* Construct a kie session
*/
- final KieSession kieSession = Util.buildContainer(droolsTemplate,
+ final KieSession kieSession = SupportUtil.buildContainer(droolsTemplate,
pair.first.getControlLoop().getControlLoopName(),
policyScope, policyName, policyVersion, URLEncoder.encode(pair.second, "UTF-8"));
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VdnsControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VdnsControlLoopTest.java
index b5b7a4858..58f0840ac 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VdnsControlLoopTest.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VdnsControlLoopTest.java
@@ -66,15 +66,15 @@ public class VdnsControlLoopTest implements TopicListener {
private static List<? extends TopicSink> noopTopics;
private static KieSession kieSession;
- private static Util.Pair<ControlLoopPolicy, String> pair;
+ private static SupportUtil.Pair<ControlLoopPolicy, String> pair;
private UUID requestId;
static {
/* Set environment properties */
- Util.setAaiProps();
- Util.setSoProps();
- Util.setGuardProps();
- Util.setPuProp();
+ SupportUtil.setAaiProps();
+ SupportUtil.setSoProps();
+ SupportUtil.setGuardProps();
+ SupportUtil.setPuProp();
LoggerUtil.setLevel(LoggerUtil.ROOT_LOGGER, "INFO");
}
@@ -104,9 +104,9 @@ public class VdnsControlLoopTest implements TopicListener {
.modelClassLoaderHash(1111));
try {
- Util.buildAaiSim();
- Util.buildSoSim();
- Util.buildGuardSim();
+ SupportUtil.buildAaiSim();
+ SupportUtil.buildSoSim();
+ SupportUtil.buildGuardSim();
} catch (Exception e) {
fail(e.getMessage());
}
@@ -285,7 +285,7 @@ public class VdnsControlLoopTest implements TopicListener {
/*
* Load policies from yaml
*/
- pair = Util.loadYaml(yamlFile);
+ pair = SupportUtil.loadYaml(yamlFile);
assertNotNull(pair);
assertNotNull(pair.first);
assertNotNull(pair.first.getControlLoop());
@@ -295,7 +295,7 @@ public class VdnsControlLoopTest implements TopicListener {
/*
* Construct a kie session
*/
- final KieSession kieSession = Util.buildContainer(droolsTemplate,
+ final KieSession kieSession = SupportUtil.buildContainer(droolsTemplate,
pair.first.getControlLoop().getControlLoopName(),
policyScope, policyName, policyVersion, URLEncoder.encode(pair.second, "UTF-8"));
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfcControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfcControlLoopTest.java
index 5a5dc8ac4..aa4c108c5 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfcControlLoopTest.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfcControlLoopTest.java
@@ -69,15 +69,15 @@ public class VfcControlLoopTest implements TopicListener {
private static List<? extends TopicSink> noopTopics;
private static KieSession kieSession;
- private static Util.Pair<ControlLoopPolicy, String> pair;
+ private static SupportUtil.Pair<ControlLoopPolicy, String> pair;
private UUID requestId;
static {
/* Set environment properties */
- Util.setAaiProps();
- Util.setVfcProps();
- Util.setGuardProps();
- Util.setPuProp();
+ SupportUtil.setAaiProps();
+ SupportUtil.setVfcProps();
+ SupportUtil.setGuardProps();
+ SupportUtil.setPuProp();
LoggerUtil.setLevel(LoggerUtil.ROOT_LOGGER, "INFO");
}
@@ -107,9 +107,9 @@ public class VfcControlLoopTest implements TopicListener {
.modelClassLoaderHash(1111));
try {
- Util.buildAaiSim();
- Util.buildVfcSim();
- Util.buildGuardSim();
+ SupportUtil.buildAaiSim();
+ SupportUtil.buildVfcSim();
+ SupportUtil.buildGuardSim();
} catch (Exception e) {
fail(e.getMessage());
}
@@ -253,7 +253,7 @@ public class VfcControlLoopTest implements TopicListener {
/*
* Load policies from yaml
*/
- pair = Util.loadYaml(yamlFile);
+ pair = SupportUtil.loadYaml(yamlFile);
assertNotNull(pair);
assertNotNull(pair.first);
assertNotNull(pair.first.getControlLoop());
@@ -263,7 +263,7 @@ public class VfcControlLoopTest implements TopicListener {
/*
* Construct a kie session
*/
- final KieSession kieSession = Util.buildContainer(droolsTemplate,
+ final KieSession kieSession = SupportUtil.buildContainer(droolsTemplate,
pair.first.getControlLoop().getControlLoopName(),
policyScope, policyName, policyVersion, URLEncoder.encode(pair.second, "UTF-8"));
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfwControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfwControlLoopTest.java
index 2bcaa5b7e..123d1b398 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfwControlLoopTest.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfwControlLoopTest.java
@@ -68,14 +68,14 @@ public class VfwControlLoopTest implements TopicListener {
private static List<? extends TopicSink> noopTopics;
private static KieSession kieSession;
- private static Util.Pair<ControlLoopPolicy, String> pair;
+ private static SupportUtil.Pair<ControlLoopPolicy, String> pair;
private UUID requestId;
static {
/* Set environment properties */
- Util.setAaiProps();
- Util.setGuardProps();
- Util.setPuProp();
+ SupportUtil.setAaiProps();
+ SupportUtil.setGuardProps();
+ SupportUtil.setPuProp();
LoggerUtil.setLevel(LoggerUtil.ROOT_LOGGER, "INFO");
}
@@ -117,8 +117,8 @@ public class VfwControlLoopTest implements TopicListener {
.modelClassLoaderHash(1111));
try {
- Util.buildAaiSim();
- Util.buildGuardSim();
+ SupportUtil.buildAaiSim();
+ SupportUtil.buildGuardSim();
} catch (Exception e) {
fail(e.getMessage());
}
@@ -299,7 +299,7 @@ public class VfwControlLoopTest implements TopicListener {
/*
* Load policies from yaml
*/
- pair = Util.loadYaml(yamlFile);
+ pair = SupportUtil.loadYaml(yamlFile);
assertNotNull(pair);
assertNotNull(pair.first);
assertNotNull(pair.first.getControlLoop());
@@ -309,7 +309,7 @@ public class VfwControlLoopTest implements TopicListener {
/*
* Construct a kie session
*/
- final KieSession kieSession = Util.buildContainer(droolsTemplate,
+ final KieSession kieSession = SupportUtil.buildContainer(droolsTemplate,
pair.first.getControlLoop().getControlLoopName(),
policyScope, policyName, policyVersion, URLEncoder.encode(pair.second, "UTF-8"));
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VpciControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VpciControlLoopTest.java
index 89e309f09..8cbb4d69d 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VpciControlLoopTest.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VpciControlLoopTest.java
@@ -71,14 +71,14 @@ public class VpciControlLoopTest implements TopicListener {
private static List<? extends TopicSink> noopTopics;
private static KieSession kieSession;
- private static Util.Pair<ControlLoopPolicy, String> pair;
+ private static SupportUtil.Pair<ControlLoopPolicy, String> pair;
private UUID requestId;
static {
/* Set environment properties */
- Util.setAaiProps();
- Util.setGuardProps();
- Util.setPuProp();
+ SupportUtil.setAaiProps();
+ SupportUtil.setGuardProps();
+ SupportUtil.setPuProp();
LoggerUtil.setLevel(LoggerUtil.ROOT_LOGGER, "DEBUG");
}
@@ -119,8 +119,8 @@ public class VpciControlLoopTest implements TopicListener {
.customJacksonCoder(null)
.modelClassLoaderHash(1111));
try {
- Util.buildAaiSim();
- Util.buildGuardSim();
+ SupportUtil.buildAaiSim();
+ SupportUtil.buildGuardSim();
} catch (Exception e) {
fail(e.getMessage());
}
@@ -258,7 +258,7 @@ public class VpciControlLoopTest implements TopicListener {
/*
* Load policies from yaml
*/
- pair = Util.loadYaml(yamlFile);
+ pair = SupportUtil.loadYaml(yamlFile);
assertNotNull(pair);
assertNotNull(pair.first);
assertNotNull(pair.first.getControlLoop());
@@ -268,7 +268,7 @@ public class VpciControlLoopTest implements TopicListener {
/*
* Construct a kie session
*/
- final KieSession kieSession = Util.buildContainer(droolsTemplate,
+ final KieSession kieSession = SupportUtil.buildContainer(droolsTemplate,
pair.first.getControlLoop().getControlLoopName(), policyScope, policyName, policyVersion,
URLEncoder.encode(pair.second, "UTF-8"));