X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Ftest%2Fjava%2Forg%2Fonap%2Fclamp%2Floop%2FPolicyComponentTest.java;h=4d2bfe280c39949c314826ee60187a6152f435a4;hb=f01d3e8377fa4e5a9c1b129fe446575d132f91c2;hp=6449a8966ffbe306fadcf7e13d8e65d59bef4dff;hpb=8b9918e7e3b1398ece5470f36be1d9dd13e29bee;p=clamp.git diff --git a/src/test/java/org/onap/clamp/loop/PolicyComponentTest.java b/src/test/java/org/onap/clamp/loop/PolicyComponentTest.java index 6449a896..4d2bfe28 100644 --- a/src/test/java/org/onap/clamp/loop/PolicyComponentTest.java +++ b/src/test/java/org/onap/clamp/loop/PolicyComponentTest.java @@ -23,7 +23,6 @@ package org.onap.clamp.loop; -import static org.assertj.core.api.Assertions.assertThat; import com.google.gson.Gson; import com.google.gson.JsonObject; import java.io.IOException; @@ -31,8 +30,7 @@ import org.apache.camel.Exchange; import org.apache.camel.Message; import org.junit.Test; import org.mockito.Mockito; -import org.onap.clamp.clds.config.LegacyOperationalPolicyController; -import org.onap.clamp.clds.util.ResourceFileUtil; +import org.onap.clamp.clds.util.ResourceFileUtils; import org.onap.clamp.loop.components.external.ExternalComponentState; import org.onap.clamp.loop.components.external.PolicyComponent; import org.onap.clamp.loop.template.LoopTemplate; @@ -40,6 +38,8 @@ import org.onap.clamp.loop.template.PolicyModel; import org.onap.clamp.policy.microservice.MicroServicePolicy; import org.onap.clamp.policy.operational.OperationalPolicy; +import static org.assertj.core.api.Assertions.assertThat; + public class PolicyComponentTest { /** @@ -256,7 +256,7 @@ public class PolicyComponentTest { */ @Test public void createPoliciesPayloadPdpGroupTest() throws IOException { - Loop loopTest = new Loop("ControlLoopTest", ""); + Loop loopTest = new Loop("ControlLoopTest"); PolicyModel policyModel1 = new PolicyModel("onap.policies.monitoring.test", null, "1.0.0"); MicroServicePolicy microServicePolicy = new MicroServicePolicy("configPolicyTest", policyModel1, true, @@ -267,7 +267,7 @@ public class PolicyComponentTest { new Gson().fromJson("{\"configtype\":\"json\"}", JsonObject.class), null, "pdpGroup2", "pdpSubgroup1"); loopTest.addMicroServicePolicy(microServicePolicy2); - PolicyModel policyModel2 = new PolicyModel(LegacyOperationalPolicyController.OPERATIONAL_POLICY_LEGACY, null, + PolicyModel policyModel2 = new PolicyModel("onap.policies.monitoring.test2", null, "1.0.0"); OperationalPolicy opPolicy = new OperationalPolicy("opPolicy", new Gson().fromJson("{\"configtype\":\"json\"}", JsonObject.class), @@ -285,12 +285,12 @@ public class PolicyComponentTest { loopTest.addOperationalPolicy(opLegacyPolicy); - LoopTemplate loopTemplate = new LoopTemplate("test", "yaml", "svg", 1, null); + LoopTemplate loopTemplate = new LoopTemplate("test", "yaml", 1, null); loopTemplate.setDcaeBlueprintId("UUID-blueprint"); loopTest.setLoopTemplate(loopTemplate); String payload = PolicyComponent.createPoliciesPayloadPdpGroup(loopTest, "POST"); - String expectedRes = ResourceFileUtil.getResourceAsString("tosca/pdp-group-policy-payload.json"); + String expectedRes = ResourceFileUtils.getResourceAsString("tosca/pdp-group-policy-payload.json"); assertThat(payload).isEqualTo(expectedRes); }