X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=POLICY-SDK-APP%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fpolicy%2Fcontroller%2FCreateOptimizationControllerTest.java;h=8e1b8be87f100072937b8a0e0eccd9c7592e47c3;hb=1e61676b77dd09659027b8984f050df7e8538526;hp=6a5e83f4ed8aacde03c83c42dc3b6e45a4d9b3cd;hpb=b831c6a3df8e1dc9017ae5e8ad002dc3b1002aab;p=policy%2Fengine.git diff --git a/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/CreateOptimizationControllerTest.java b/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/CreateOptimizationControllerTest.java index 6a5e83f4e..8e1b8be87 100644 --- a/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/CreateOptimizationControllerTest.java +++ b/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/CreateOptimizationControllerTest.java @@ -66,14 +66,12 @@ import org.onap.policy.rest.dao.CommonClassDao; import org.onap.policy.rest.jpa.ConfigurationDataEntity; import org.onap.policy.rest.jpa.OptimizationModels; import org.onap.policy.rest.jpa.PolicyEntity; -import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletResponse; /** * The class CreateOptimizationControllerTest contains tests for the class - * {@link CreateOptimizationController}* * - * All JUnits are designed to run in the local development environment where they have write + *

All JUnits are designed to run in the local development environment where they have write * privileges and can execute time-sensitive tasks. */ public class CreateOptimizationControllerTest { @@ -126,7 +124,7 @@ public class CreateOptimizationControllerTest { } /** - * Run the PolicyRestAdapter setDataToPolicyRestAdapter(PolicyRestAdapter, JsonNode) method test + * Run the PolicyRestAdapter setDataToPolicyRestAdapter(PolicyRestAdapter, JsonNode) method test. */ @Test @@ -143,7 +141,7 @@ public class CreateOptimizationControllerTest { PolicyRestAdapter policyData = null; try { root = JsonLoader.fromString(jsonString); - policyData = (PolicyRestAdapter) mapper.readValue(root.get("policyData").get("policy").toString(), + policyData = mapper.readValue(root.get("policyData").get("policy").toString(), PolicyRestAdapter.class); } catch (Exception e) { logger.error("testSetDataToPolicyRestAdapter", e); @@ -158,7 +156,7 @@ public class CreateOptimizationControllerTest { /** * Run the ModelAndView getOptimizationTemplateData(HttpServletRequest, HttpServletResponse) - * method test + * method test. */ @Test @@ -201,7 +199,7 @@ public class CreateOptimizationControllerTest { /** * Run the ModelAndView getModelServiceVersionData(HttpServletRequest, HttpServletResponse) - * method test + * method test. */ @Test @@ -244,7 +242,7 @@ public class CreateOptimizationControllerTest { } /** - * Run the void prePopulateDCAEMSPolicyData(PolicyRestAdapter, PolicyEntity) method test + * Run the void prePopulateDCAEMSPolicyData(PolicyRestAdapter, PolicyEntity) method test. */ @Test @@ -267,7 +265,7 @@ public class CreateOptimizationControllerTest { try { root = JsonLoader.fromString(jsonString); - restAdapter = (PolicyRestAdapter) mapper.readValue(root.get("policyData").get("policy").toString(), + restAdapter = mapper.readValue(root.get("policyData").get("policy").toString(), PolicyRestAdapter.class); PolicyType policyType = new PolicyType(); TargetType target = new TargetType(); @@ -387,7 +385,7 @@ public class CreateOptimizationControllerTest { } /** - * Run the void SetMSModelData(HttpServletRequest, HttpServletResponse) method test + * Run the void SetMSModelData(HttpServletRequest, HttpServletResponse) method test. */ @Test @@ -429,9 +427,7 @@ public class CreateOptimizationControllerTest { } /** - * - * @ Get File Stream - * + * @ Get File Stream. */ private class MockServletInputStream extends ServletInputStream {