X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=POLICY-SDK-APP%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fpolicy%2Fcontroller%2FCreateDcaeMicroServiceControllerTest.java;h=f5f8a18ae0d85ef9b03cbb0ea69959362571a887;hb=06e02108525c3e5e8c85de233aef3bb332173c00;hp=8d8f57b0d6844903d2cdf4d91648db61948b1f64;hpb=f1e1aac664fed1efa8bf78656a9aa1a2ea5a17cd;p=policy%2Fengine.git
diff --git a/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/CreateDcaeMicroServiceControllerTest.java b/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/CreateDcaeMicroServiceControllerTest.java
index 8d8f57b0d..f5f8a18ae 100644
--- a/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/CreateDcaeMicroServiceControllerTest.java
+++ b/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/CreateDcaeMicroServiceControllerTest.java
@@ -2,14 +2,16 @@
* ============LICENSE_START=======================================================
* ONAP Policy Engine
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Modifications Copyright (C) 2019 Samsung
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -29,7 +31,10 @@ import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.github.fge.jackson.JsonLoader;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
@@ -41,11 +46,16 @@ import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
-
import javax.servlet.ReadListener;
import javax.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest;
-
+import oasis.names.tc.xacml._3_0.core.schema.wd_17.AllOfType;
+import oasis.names.tc.xacml._3_0.core.schema.wd_17.AnyOfType;
+import oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeDesignatorType;
+import oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeValueType;
+import oasis.names.tc.xacml._3_0.core.schema.wd_17.MatchType;
+import oasis.names.tc.xacml._3_0.core.schema.wd_17.PolicyType;
+import oasis.names.tc.xacml._3_0.core.schema.wd_17.TargetType;
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.common.logging.flexlogger.FlexLogger;
@@ -58,581 +68,541 @@ import org.onap.policy.rest.jpa.PolicyEntity;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.github.fge.jackson.JsonLoader;
-
-import oasis.names.tc.xacml._3_0.core.schema.wd_17.AllOfType;
-import oasis.names.tc.xacml._3_0.core.schema.wd_17.AnyOfType;
-import oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeDesignatorType;
-import oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeValueType;
-import oasis.names.tc.xacml._3_0.core.schema.wd_17.MatchType;
-import oasis.names.tc.xacml._3_0.core.schema.wd_17.PolicyType;
-import oasis.names.tc.xacml._3_0.core.schema.wd_17.TargetType;
-
/**
- * The class CreateDcaeMicroServiceControllerTest
contains tests
- * for the class {@link CreateDcaeMicroServiceController
}*
- *
- * All JUnits are designed to run in the local development environment
- * where they have write privileges and can execute time-sensitive
- * tasks.
+ * The class CreateDcaeMicroServiceControllerTest
contains tests for the class
+ * {@link CreateDcaeMicroServiceController
}*
*
- *
+ * All JUnits are designed to run in the local development environment where they have write privileges and can execute
+ * time-sensitive tasks.
*
*/
public class CreateDcaeMicroServiceControllerTest {
-
- private static Logger logger = FlexLogger.getLogger(CreateDcaeMicroServiceControllerTest.class);
- private static CommonClassDao commonClassDao;
- private String jsonString = null;
- private String configBodyString = null;
- private HttpServletRequest request = null;
-
- @Before
- public void setUp() throws Exception {
-
- logger.info("setUp: Entering");
+
+ private static Logger logger = FlexLogger.getLogger(CreateDcaeMicroServiceControllerTest.class);
+ private static CommonClassDao commonClassDao;
+ private String jsonString = null;
+ private String configBodyString = null;
+ private HttpServletRequest request = null;
+
+ @Before
+ public void setUp() throws Exception {
+ logger.info("setUp: Entering");
commonClassDao = mock(CommonClassDao.class);
List