summaryrefslogtreecommitdiffstats
path: root/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/MicroServiceDictionaryControllerTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/MicroServiceDictionaryControllerTest.java')
-rw-r--r--ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/MicroServiceDictionaryControllerTest.java1342
1 files changed, 671 insertions, 671 deletions
diff --git a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/MicroServiceDictionaryControllerTest.java b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/MicroServiceDictionaryControllerTest.java
index ae71692c1..2e9df2592 100644
--- a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/MicroServiceDictionaryControllerTest.java
+++ b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/MicroServiceDictionaryControllerTest.java
@@ -58,17 +58,17 @@ import org.springframework.mock.web.MockHttpServletResponse;
*/
public class MicroServiceDictionaryControllerTest {
-
- private static Logger logger = FlexLogger.getLogger(MicroServiceDictionaryControllerTest.class);
- private static CommonClassDao commonClassDao;
- private String jsonString = null;
- private HttpServletRequest request = null;
- private MicroServiceDictionaryController controller = null;
- BufferedReader br = null;
-
- @Before
- public void setUp() throws Exception {
- logger.info("setUp: Entering");
+
+ private static Logger logger = FlexLogger.getLogger(MicroServiceDictionaryControllerTest.class);
+ private static CommonClassDao commonClassDao;
+ private String jsonString = null;
+ private HttpServletRequest request = null;
+ private MicroServiceDictionaryController controller = null;
+ BufferedReader br = null;
+
+ @Before
+ public void setUp() throws Exception {
+ logger.info("setUp: Entering");
commonClassDao = Mockito.mock(CommonClassDao.class);
UserInfo userInfo = new UserInfo();
userInfo.setUserLoginId("testUserId");
@@ -89,21 +89,21 @@ public class MicroServiceDictionaryControllerTest {
MicroServiceModels microServiceModels = new MicroServiceModels();
doNothing().when(commonClassDao).delete(microServiceModels);
-
- MicroServiceDictionaryController.setCommonClassDao(commonClassDao);
-
- controller = new MicroServiceDictionaryController();
+
+ MicroServiceDictionaryController.setCommonClassDao(commonClassDao);
+
+ controller = new MicroServiceDictionaryController();
HttpServletRequest request = Mockito.mock(HttpServletRequest.class);
- jsonString = "{\"microServiceModelsDictionaryData\": {\"modelName\": \"test\", \"inprocess\": false,\"model\": {\"name\": \"testingdata\", "
- + " \"subScopename\": \"\",\"path\": [],\"type\": \"dir\",\"size\": 0,\"date\": \"2017-04-12T21:26:57.000Z\", "
- + " \"version\": \"\",\"createdBy\": \"someone\", \"modifiedBy\": \"someone\", \"content\": \"\",\"recursive\": false},"
- + " \"tempModel\": {\"name\": \"testingdata\",\"subScopename\": \"\" },"
- + " \"policy\": {\"policyType\": \"Config\",\"configPolicyType\": \"Micro Service\",\"policyName\": \"may1501\", "
- + " \"policyDescription\": \"testing input\", \"onapName\": \"RaviTest\",\"guard\": \"False\",\"riskType\": \"Risk12345\",\"riskLevel\": \"2\","
- + " \"priority\": \"6\",\"serviceType\": \"DkatPolicyBody\",\"version\": \"1707.41.02\",\"ruleGridData\": [ [\"fileId\"]],\"ttlDate\": null}}, "
- + " \"policyJSON\": {\"pmTableName\": \"test\", \"dmdTopic\": \"1\",\"fileId\": \"56\"} }";
+ jsonString = "{\"microServiceModelsDictionaryData\": {\"modelName\": \"test\", \"inprocess\": false,\"model\": {\"name\": \"testingdata\", "
+ + " \"subScopename\": \"\",\"path\": [],\"type\": \"dir\",\"size\": 0,\"date\": \"2017-04-12T21:26:57.000Z\", "
+ + " \"version\": \"\",\"createdBy\": \"someone\", \"modifiedBy\": \"someone\", \"content\": \"\",\"recursive\": false},"
+ + " \"tempModel\": {\"name\": \"testingdata\",\"subScopename\": \"\" },"
+ + " \"policy\": {\"policyType\": \"Config\",\"configPolicyType\": \"Micro Service\",\"policyName\": \"may1501\", "
+ + " \"policyDescription\": \"testing input\", \"onapName\": \"RaviTest\",\"guard\": \"False\",\"riskType\": \"Risk12345\",\"riskLevel\": \"2\","
+ + " \"priority\": \"6\",\"serviceType\": \"DkatPolicyBody\",\"version\": \"1707.41.02\",\"ruleGridData\": [ [\"fileId\"]],\"ttlDate\": null}}, "
+ + " \"policyJSON\": {\"pmTableName\": \"test\", \"dmdTopic\": \"1\",\"fileId\": \"56\"} }";
br = new BufferedReader(new StringReader(jsonString));
//--- mock the getReader() call
@@ -112,653 +112,653 @@ public class MicroServiceDictionaryControllerTest {
DictionaryUtils.setDictionaryUtils(new DictionaryUtils());
mock(DictionaryUtils.class);
logger.info("setUp: exit");
- }
-
-
- @Test
- public void testSaveMicroServiceHeaderDefaultValues() {
- logger.info("testSaveMicroServiceHeaderDefaultValues: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
- request = mock(HttpServletRequest.class);
-
- try {
- // mock the getReader() call
- jsonString = "{\"modelAttributeDictionaryData\": {\"onapName\": \"test\", \"guard\": false,\"priority\": \"3\","
- + " \"riskType\": \"test\", \"riskLevel\": \"7\", \"modelName\": \"testname\"}}";
- BufferedReader br = new BufferedReader(new StringReader(jsonString));
- when(request.getReader()).thenReturn(br);
- controller.saveMicroServiceHeaderDefaultValues(request, response);
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceHeaderDefaultDatas"));
-
- } catch (Exception e) {
- fail("Exception: " + e);
- }
-
- logger.info("testSaveMicroServiceHeaderDefaultValues: exit");
- }
-
-
- @Test
- public void testGetMicroServiceHeaderDefaultsEntityDataByName() {
- logger.info("testGetMicroServiceHeaderDefaultsEntityDataByName: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
-
- controller.getMicroServiceHeaderDefaultsEntityDataByName(response);
-
- try {
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceHeaderDefaultDatas"));
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- } catch (UnsupportedEncodingException e) {
- fail("Exception: " + e);
- }
-
- logger.info("testGetMicroServiceHeaderDefaultsEntityDataByName: exit");
- }
-
- @Test
- public void testGetMicroServiceHeaderDefaultsEntityData() {
- logger.info("testGetMicroServiceHeaderDefaultsEntityData: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
-
- controller.getMicroServiceHeaderDefaultsEntityData(response);
-
- try {
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceHeaderDefaultDatas"));
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- } catch (UnsupportedEncodingException e) {
- fail("Exception: " + e);
- }
-
- logger.info("testGetMicroServiceHeaderDefaultsEntityData: exit");
- }
-
- @Test
- public void testRemoveMicroServiceHeaderDefaults() {
- logger.info("testRemoveMicroServiceHeaderDefaults: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
- request = mock(HttpServletRequest.class);
-
- try {
- // mock the getReader() call
- jsonString = "{\"data\": {\"modelName\": \"test\", \"inprocess\": false,\"model\": {\"name\": \"testingdata\", "
- + " \"subScopename\": \"\",\"path\": [],\"type\": \"dir\",\"size\": 0,\"date\": \"2017-04-12T21:26:57.000Z\", "
- + " \"version\": \"\",\"createdBy\": \"someone\", \"modifiedBy\": \"someone\", \"content\": \"\",\"recursive\": false},"
- + " \"tempModel\": {\"name\": \"testingdata\",\"subScopename\": \"\" },"
- + " \"policy\": {\"policyType\": \"Config\",\"configPolicyType\": \"Micro Service\",\"policyName\": \"may1501\", "
- + " \"policyDescription\": \"testing input\", \"onapName\": \"RaviTest\",\"guard\": \"False\",\"riskType\": \"Risk12345\",\"riskLevel\": \"2\","
- + " \"priority\": \"6\",\"serviceType\": \"DkatPolicyBody\",\"version\": \"1707.41.02\",\"ruleGridData\": [ [\"fileId\"]],\"ttlDate\": null}}, "
- + " \"policyJSON\": {\"pmTableName\": \"test\", \"dmdTopic\": \"1\",\"fileId\": \"56\"} }";
- BufferedReader br = new BufferedReader(new StringReader(jsonString));
- when(request.getReader()).thenReturn(br);
- controller.removeMicroServiceHeaderDefaults(request, response);
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceHeaderDefaultDatas"));
-
- } catch (Exception e) {
- fail("Exception: " + e);
- }
-
- logger.info("testRemoveMicroServiceHeaderDefaults: exit");
- }
-
-
- @Test
- public void testGetDCAEUUIDDictionaryByNameEntityData() {
-
- logger.info("testGetDCAEUUIDDictionaryByNameEntityData: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
-
- controller.getDCAEUUIDDictionaryByNameEntityData(response);
-
- try {
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("dcaeUUIDDictionaryDatas"));
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- } catch (UnsupportedEncodingException e) {
- fail("Exception: " + e);
- }
-
- logger.info("testGetDCAEUUIDDictionaryByNameEntityData: exit");
- }
-
- @Test
- public void testGetDCAEUUIDDictionaryEntityData() {
-
- logger.info("testGetDCAEUUIDDictionaryEntityData: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
-
- controller.getDCAEUUIDDictionaryEntityData(response);
-
- try {
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("dcaeUUIDDictionaryDatas"));
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- } catch (UnsupportedEncodingException e) {
- fail("Exception: " + e);
- }
-
- logger.info("testGetDCAEUUIDDictionaryEntityData: exit");
- }
-
- @Test
- public void testSaveDCAEUUIDDictionary() {
- logger.info("testSaveDCAEUUIDDictionary: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
- request = mock(HttpServletRequest.class);
-
- try {
- // mock the getReader() call
- jsonString = "{\"dcaeUUIDDictionaryData\": {\"modelName\": \"test\", \"inprocess\": false,\"model\": {\"name\": \"testingdata\", "
- + " \"subScopename\": \"\",\"path\": [],\"type\": \"dir\",\"size\": 0,\"date\": \"2017-04-12T21:26:57.000Z\", "
- + " \"version\": \"\",\"createdBy\": \"someone\", \"modifiedBy\": \"someone\", \"content\": \"\",\"recursive\": false},"
- + " \"tempModel\": {\"name\": \"testingdata\",\"subScopename\": \"\" },"
- + " \"policy\": {\"policyType\": \"Config\",\"configPolicyType\": \"Micro Service\",\"policyName\": \"may1501\", "
- + " \"policyDescription\": \"testing input\", \"onapName\": \"RaviTest\",\"guard\": \"False\",\"riskType\": \"Risk12345\",\"riskLevel\": \"2\","
- + " \"priority\": \"6\",\"serviceType\": \"DkatPolicyBody\",\"version\": \"1707.41.02\",\"ruleGridData\": [ [\"fileId\"]],\"ttlDate\": null}}, "
- + " \"policyJSON\": {\"pmTableName\": \"test\", \"dmdTopic\": \"1\",\"fileId\": \"56\"} }";
- BufferedReader br = new BufferedReader(new StringReader(jsonString));
- when(request.getReader()).thenReturn(br);
- controller.saveDCAEUUIDDictionary(request, response);
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("dcaeUUIDDictionaryDatas"));
-
- } catch (Exception e) {
- fail("Exception: " + e);
- }
-
- logger.info("testSaveDCAEUUIDDictionary: exit");
- }
-
- @Test
- public void testRemoveDCAEUUIDDictionary() {
- logger.info("testRemoveDCAEUUIDDictionary: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
- request = mock(HttpServletRequest.class);
-
- try {
- // mock the getReader() call
- jsonString = "{\"data\": {\"modelName\": \"test\", \"inprocess\": false,\"model\": {\"name\": \"testingdata\", "
- + " \"subScopename\": \"\",\"path\": [],\"type\": \"dir\",\"size\": 0,\"date\": \"2017-04-12T21:26:57.000Z\", "
- + " \"version\": \"\",\"createdBy\": \"someone\", \"modifiedBy\": \"someone\", \"content\": \"\",\"recursive\": false},"
- + " \"tempModel\": {\"name\": \"testingdata\",\"subScopename\": \"\" },"
- + " \"policy\": {\"policyType\": \"Config\",\"configPolicyType\": \"Micro Service\",\"policyName\": \"may1501\", "
- + " \"policyDescription\": \"testing input\", \"onapName\": \"RaviTest\",\"guard\": \"False\",\"riskType\": \"Risk12345\",\"riskLevel\": \"2\","
- + " \"priority\": \"6\",\"serviceType\": \"DkatPolicyBody\",\"version\": \"1707.41.02\",\"ruleGridData\": [ [\"fileId\"]],\"ttlDate\": null}}, "
- + " \"policyJSON\": {\"pmTableName\": \"test\", \"dmdTopic\": \"1\",\"fileId\": \"56\"} }";
- BufferedReader br = new BufferedReader(new StringReader(jsonString));
- when(request.getReader()).thenReturn(br);
- controller.removeMicroServiceConfigNameDictionary(request, response);
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceConfigNameDictionaryDatas"));
-
- } catch (Exception e) {
- fail("Exception: " + e);
- }
-
- logger.info("testRemoveDCAEUUIDDictionary: exit");
- }
-
- @Test
- public void testGetMicroServiceConfigNameByNameDictionaryEntityData() {
- logger.info("testGetMicroServiceConfigNameByNameDictionaryEntityData: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
-
- controller.getMicroServiceConfigNameByNameDictionaryEntityData(response);
-
- try {
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceConfigNameDictionaryDatas"));
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- } catch (UnsupportedEncodingException e) {
- fail("Exception: " + e);
- }
-
- logger.info("testGetMicroServiceConfigNameByNameDictionaryEntityData: exit");
- }
-
- @Test
- public void testGetMicroServiceConfigNameDictionaryEntityData() {
- logger.info("testGetMicroServiceConfigNameByNameDictionaryEntityData: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
-
- controller.getMicroServiceConfigNameDictionaryEntityData(response);
-
- try {
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceConfigNameDictionaryDatas"));
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- } catch (UnsupportedEncodingException e) {
- fail("Exception: " + e);
- }
-
- logger.info("testGetMicroServiceConfigNameDictionaryEntityData: exit");
- }
-
- @Test
- public void testSaveMicroServiceConfigNameDictionary() {
- logger.info("testSaveMicroServiceConfigNameDictionary: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
- request = mock(HttpServletRequest.class);
-
- try {
- // mock the getReader() call
- jsonString = "{\"microServiceConfigNameDictionaryData\": {\"modelName\": \"test\", \"inprocess\": false,\"model\": {\"name\": \"testingdata\", "
- + " \"subScopename\": \"\",\"path\": [],\"type\": \"dir\",\"size\": 0,\"date\": \"2017-04-12T21:26:57.000Z\", "
- + " \"version\": \"\",\"createdBy\": \"someone\", \"modifiedBy\": \"someone\", \"content\": \"\",\"recursive\": false},"
- + " \"tempModel\": {\"name\": \"testingdata\",\"subScopename\": \"\" },"
- + " \"policy\": {\"policyType\": \"Config\",\"configPolicyType\": \"Micro Service\",\"policyName\": \"may1501\", "
- + " \"policyDescription\": \"testing input\", \"onapName\": \"RaviTest\",\"guard\": \"False\",\"riskType\": \"Risk12345\",\"riskLevel\": \"2\","
- + " \"priority\": \"6\",\"serviceType\": \"DkatPolicyBody\",\"version\": \"1707.41.02\",\"ruleGridData\": [ [\"fileId\"]],\"ttlDate\": null}}, "
- + " \"policyJSON\": {\"pmTableName\": \"test\", \"dmdTopic\": \"1\",\"fileId\": \"56\"} }";
- BufferedReader br = new BufferedReader(new StringReader(jsonString));
- when(request.getReader()).thenReturn(br);
- controller.saveMicroServiceConfigNameDictionary(request, response);
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceConfigNameDictionaryDatas"));
-
- } catch (Exception e) {
- fail("Exception: " + e);
- }
-
- logger.info("testSaveMicroServiceConfigNameDictionary: exit");
- }
-
- @Test
- public void testRemoveMicroServiceConfigNameDictionary() {
- logger.info("testRemoveMicroServiceConfigNameDictionary: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
- request = mock(HttpServletRequest.class);
-
- try {
- // mock the getReader() call
- jsonString = "{\"data\": {\"modelName\": \"test\", \"inprocess\": false,\"model\": {\"name\": \"testingdata\", "
- + " \"subScopename\": \"\",\"path\": [],\"type\": \"dir\",\"size\": 0,\"date\": \"2017-04-12T21:26:57.000Z\", "
- + " \"version\": \"\",\"createdBy\": \"someone\", \"modifiedBy\": \"someone\", \"content\": \"\",\"recursive\": false},"
- + " \"tempModel\": {\"name\": \"testingdata\",\"subScopename\": \"\" },"
- + " \"policy\": {\"policyType\": \"Config\",\"configPolicyType\": \"Micro Service\",\"policyName\": \"may1501\", "
- + " \"policyDescription\": \"testing input\", \"onapName\": \"RaviTest\",\"guard\": \"False\",\"riskType\": \"Risk12345\",\"riskLevel\": \"2\","
- + " \"priority\": \"6\",\"serviceType\": \"DkatPolicyBody\",\"version\": \"1707.41.02\",\"ruleGridData\": [ [\"fileId\"]],\"ttlDate\": null}}, "
- + " \"policyJSON\": {\"pmTableName\": \"test\", \"dmdTopic\": \"1\",\"fileId\": \"56\"} }";
- BufferedReader br = new BufferedReader(new StringReader(jsonString));
- when(request.getReader()).thenReturn(br);
- controller.removeMicroServiceConfigNameDictionary(request, response);
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceConfigNameDictionaryDatas"));
-
- } catch (Exception e) {
- fail("Exception: " + e);
- }
-
- logger.info("testRemoveMicroServiceConfigNameDictionary: exit");
- }
-
- @Test
- public void testGetMicroServiceLocationByNameDictionaryEntityData() {
-
- logger.info("testGetMicroServiceLocationByNameDictionaryEntityData: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
-
- controller.getMicroServiceLocationByNameDictionaryEntityData(response);
-
- try {
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceLocationDictionaryDatas"));
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- } catch (UnsupportedEncodingException e) {
- fail("Exception: " + e);
- }
-
- logger.info("testGetMicroServiceLocationByNameDictionaryEntityData: exit");
- }
-
- @Test
- public void testGetMicroServiceLocationDictionaryEntityData() {
- logger.info("testGetMicroServiceLocationDictionaryEntityData: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
-
- controller.getMicroServiceLocationDictionaryEntityData(response);
-
- try {
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceLocationDictionaryDatas"));
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- } catch (UnsupportedEncodingException e) {
- fail("Exception: " + e);
- }
-
- logger.info("testGetMicroServiceLocationDictionaryEntityData: exit");
- }
-
- @Test
- public void testSaveMicroServiceLocationDictionary() {
- logger.info("testSaveMicroServiceLocationDictionary: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
- request = mock(HttpServletRequest.class);
-
- try {
- // mock the getReader() call
- jsonString = "{\"microServiceLocationDictionaryData\": {\"modelName\": \"test\", \"inprocess\": false,\"model\": {\"name\": \"testingdata\", "
- + " \"subScopename\": \"\",\"path\": [],\"type\": \"dir\",\"size\": 0,\"date\": \"2017-04-12T21:26:57.000Z\", "
- + " \"version\": \"\",\"createdBy\": \"someone\", \"modifiedBy\": \"someone\", \"content\": \"\",\"recursive\": false},"
- + " \"tempModel\": {\"name\": \"testingdata\",\"subScopename\": \"\" },"
- + " \"policy\": {\"policyType\": \"Config\",\"configPolicyType\": \"Micro Service\",\"policyName\": \"may1501\", "
- + " \"policyDescription\": \"testing input\", \"onapName\": \"RaviTest\",\"guard\": \"False\",\"riskType\": \"Risk12345\",\"riskLevel\": \"2\","
- + " \"priority\": \"6\",\"serviceType\": \"DkatPolicyBody\",\"version\": \"1707.41.02\",\"ruleGridData\": [ [\"fileId\"]],\"ttlDate\": null}}, "
- + " \"policyJSON\": {\"pmTableName\": \"test\", \"dmdTopic\": \"1\",\"fileId\": \"56\"} }";
- BufferedReader br = new BufferedReader(new StringReader(jsonString));
- when(request.getReader()).thenReturn(br);
- controller.saveMicroServiceLocationDictionary(request, response);
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceLocationDictionaryDatas"));
-
- } catch (Exception e) {
- fail("Exception: " + e);
- }
-
- logger.info("testSaveMicroServiceLocationDictionary: exit");
- }
-
- @Test
- public void testRemoveMicroServiceLocationDictionary() {
- logger.info("testRemoveMicroServiceLocationDictionary: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
- request = mock(HttpServletRequest.class);
-
- try {
- // mock the getReader() call
- jsonString = "{\"data\": {\"modelName\": \"test\", \"inprocess\": false,\"model\": {\"name\": \"testingdata\", "
- + " \"subScopename\": \"\",\"path\": [],\"type\": \"dir\",\"size\": 0,\"date\": \"2017-04-12T21:26:57.000Z\", "
- + " \"version\": \"\",\"createdBy\": \"someone\", \"modifiedBy\": \"someone\", \"content\": \"\",\"recursive\": false},"
- + " \"tempModel\": {\"name\": \"testingdata\",\"subScopename\": \"\" },"
- + " \"policy\": {\"policyType\": \"Config\",\"configPolicyType\": \"Micro Service\",\"policyName\": \"may1501\", "
- + " \"policyDescription\": \"testing input\", \"onapName\": \"RaviTest\",\"guard\": \"False\",\"riskType\": \"Risk12345\",\"riskLevel\": \"2\","
- + " \"priority\": \"6\",\"serviceType\": \"DkatPolicyBody\",\"version\": \"1707.41.02\",\"ruleGridData\": [ [\"fileId\"]],\"ttlDate\": null}}, "
- + " \"policyJSON\": {\"pmTableName\": \"test\", \"dmdTopic\": \"1\",\"fileId\": \"56\"} }";
- BufferedReader br = new BufferedReader(new StringReader(jsonString));
-
- when(request.getReader()).thenReturn(br);
- controller.removeMicroServiceLocationDictionary(request, response);
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceLocationDictionaryDatas"));
-
- } catch (Exception e) {
- fail("Exception: " + e);
- }
-
- logger.info("testRemoveMicroServiceLocationDictionary: exit");
- }
-
- @Test
- public void testGetMicroServiceAttributeByNameDictionaryEntityData() {
- logger.info("testGetMicroServiceAttributeByNameDictionaryEntityData: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
-
- controller.getMicroServiceAttributeByNameDictionaryEntityData(response);
-
- try {
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceAttributeDictionaryDatas"));
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- } catch (UnsupportedEncodingException e) {
- fail("Exception: " + e);
- }
-
- logger.info("testGetMicroServiceAttributeByNameDictionaryEntityData: exit");
- }
-
- @Test
- public void testGetMicroServiceAttributeDictionaryEntityData() {
- logger.info("testGetMicroServiceAttributeDictionaryEntityData: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
-
- controller.getMicroServiceAttributeDictionaryEntityData(response);
-
- try {
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceAttributeDictionaryDatas"));
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- } catch (UnsupportedEncodingException e) {
- fail("Exception: " + e);
- }
-
- logger.info("testGetMicroServiceAttributeDictionaryEntityData: exit");
- }
-
- @Test
- public void testSaveMicroServiceAttributeDictionary() {
- logger.info("testSaveMicroServiceAttributeDictionary: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
- request = mock(HttpServletRequest.class);
-
- try {
- // mock the getReader() call
- jsonString = "{\"modelAttributeDictionaryData\": {\"modelName\": \"test\", \"inprocess\": false,\"model\": {\"name\": \"testingdata\", "
- + " \"subScopename\": \"\",\"path\": [],\"type\": \"dir\",\"size\": 0,\"date\": \"2017-04-12T21:26:57.000Z\", "
- + " \"version\": \"\",\"createdBy\": \"someone\", \"modifiedBy\": \"someone\", \"content\": \"\",\"recursive\": false},"
- + " \"tempModel\": {\"name\": \"testingdata\",\"subScopename\": \"\" },"
- + " \"policy\": {\"policyType\": \"Config\",\"configPolicyType\": \"Micro Service\",\"policyName\": \"may1501\", "
- + " \"policyDescription\": \"testing input\", \"onapName\": \"RaviTest\",\"guard\": \"False\",\"riskType\": \"Risk12345\",\"riskLevel\": \"2\","
- + " \"priority\": \"6\",\"serviceType\": \"DkatPolicyBody\",\"version\": \"1707.41.02\",\"ruleGridData\": [ [\"fileId\"]],\"ttlDate\": null}}, "
- + " \"policyJSON\": {\"pmTableName\": \"test\", \"dmdTopic\": \"1\",\"fileId\": \"56\"} }";
- BufferedReader br = new BufferedReader(new StringReader(jsonString));
- when(request.getReader()).thenReturn(br);
- controller.saveMicroServiceAttributeDictionary(request, response);
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceAttributeDictionaryDatas"));
-
- } catch (Exception e) {
- fail("Exception: " + e);
- }
-
- logger.info("testSaveMicroServiceAttributeDictionary: exit");
- }
-
- @Test
- public void testRemoveMicroServiceAttributeDictionary() {
- logger.info("testRemoveMicroServiceAttributeDictionary: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
- request = mock(HttpServletRequest.class);
-
- try {
- // mock the getReader() call
- jsonString = "{\"data\": {\"modelName\": \"test\", \"inprocess\": false,\"model\": {\"name\": \"testingdata\", "
- + " \"subScopename\": \"\",\"path\": [],\"type\": \"dir\",\"size\": 0,\"date\": \"2017-04-12T21:26:57.000Z\", "
- + " \"version\": \"\",\"createdBy\": \"someone\", \"modifiedBy\": \"someone\", \"content\": \"\",\"recursive\": false},"
- + " \"tempModel\": {\"name\": \"testingdata\",\"subScopename\": \"\" },"
- + " \"policy\": {\"policyType\": \"Config\",\"configPolicyType\": \"Micro Service\",\"policyName\": \"may1501\", "
- + " \"policyDescription\": \"testing input\", \"onapName\": \"RaviTest\",\"guard\": \"False\",\"riskType\": \"Risk12345\",\"riskLevel\": \"2\","
- + " \"priority\": \"6\",\"serviceType\": \"DkatPolicyBody\",\"version\": \"1707.41.02\",\"ruleGridData\": [ [\"fileId\"]],\"ttlDate\": null}}, "
- + " \"policyJSON\": {\"pmTableName\": \"test\", \"dmdTopic\": \"1\",\"fileId\": \"56\"} }";
- BufferedReader br = new BufferedReader(new StringReader(jsonString));
- when(request.getReader()).thenReturn(br);
- controller.removeMicroServiceAttributeDictionary(request, response);
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceAttributeDictionaryDatas"));
-
- } catch (Exception e) {
- fail("Exception: " + e);
- }
-
- logger.info("testRemoveMicroServiceAttributeDictionary: exit");
- }
-
- @Test
- public void testGetMicroServiceModelsDictionaryByNameEntityData() {
- logger.info("testGetMicroServiceModelsDictionaryByNameEntityData: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
-
- controller.getMicroServiceModelsDictionaryByNameEntityData(response);
-
- try {
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceModelsDictionaryDatas"));
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- } catch (UnsupportedEncodingException e) {
- fail("Exception: " + e);
- }
-
- logger.info("testGetMicroServiceModelsDictionaryByNameEntityData: exit");
- }
-
- @Test
- public void testGetMicroServiceModelsDictionaryByVersionEntityData() {
- logger.info("testGetMicroServiceModelsDictionaryByVersionEntityData: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
- String msModelJson = "{\"microServiceModelsDictionaryData\":[\"modelName\"]}";
-
- BufferedReader br = new BufferedReader(new StringReader(msModelJson));
- request = mock(HttpServletRequest.class);
-
- try {
- // mock the getReader() call
- when(request.getReader()).thenReturn(br);
- controller.getMicroServiceModelsDictionaryByVersionEntityData(request, response);
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("No model name given"));
-
- } catch (Exception e) {
- fail("Exception: " + e);
- }
-
- logger.info("testGetMicroServiceModelsDictionaryByVersionEntityData: exit");
- }
-
- @Test
- public void testGetMicroServiceModelsDictionaryEntityData() {
- logger.info("testGetMicroServiceModelsDictionaryEntityData: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
- String msModelJson = "{\"microServiceModelsDictionaryData\":[\"modelName\"]}";
-
- BufferedReader br = new BufferedReader(new StringReader(msModelJson));
- request = mock(HttpServletRequest.class);
-
- try {
- // mock the getReader() call
- when(request.getReader()).thenReturn(br);
- controller.getMicroServiceModelsDictionaryEntityData(response);
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceModelsDictionaryDatas"));
-
- } catch (Exception e) {
- fail("Exception: " + e);
- }
-
- logger.info("testGetMicroServiceModelsDictionaryEntityData: exit");
- }
-
- @Test
- public void testGetMicroServiceModelsDictionaryEntityDataServiceVersion() {
- logger.info("testGetMicroServiceModelsDictionaryEntityDataServiceVersion: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
- String msModelJson = "{\"microServiceModelsDictionaryData\":[\"modelName\"]}";
-
- BufferedReader br = new BufferedReader(new StringReader(msModelJson));
- request = mock(HttpServletRequest.class);
-
- try {
- // mock the getReader() call
- when(request.getReader()).thenReturn(br);
- controller.getMicroServiceModelsDictionaryEntityDataServiceVersion(response);
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceModelsDictionaryDatas"));
-
- } catch (Exception e) {
- fail("Exception: " + e);
- }
-
- logger.info("testGetMicroServiceModelsDictionaryEntityDataServiceVersion: exit");
- }
-
- @Test
- public void testGetMicroServiceModelsDictionaryClassEntityData() {
- logger.info("testGetMicroServiceModelsDictionaryClassEntityData: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
- String msModelJson = "{\"microServiceModelsDictionaryData\":[\"modelName\"]}";
-
- BufferedReader br = new BufferedReader(new StringReader(msModelJson));
- request = mock(HttpServletRequest.class);
-
- try {
- // mock the getReader() call
- when(request.getReader()).thenReturn(br);
- controller.getMicroServiceModelsDictionaryClassEntityData(response);
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceModelsDictionaryClassDatas"));
-
- } catch (Exception e) {
- fail("Exception: " + e);
- }
-
- logger.info("testGetMicroServiceModelsDictionaryClassEntityData: exit");
- }
-
- @Test
- public void testSaveMicroServiceModelsDictionary() {
- logger.info("testSaveMicroServiceModelsDictionary: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
- request = mock(HttpServletRequest.class);
-
- try {
- // mock the getReader() call
- when(request.getReader()).thenReturn(br);
- controller.saveMicroServiceModelsDictionary(request, response);
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceModelsDictionaryDatas"));
-
- } catch (Exception e) {
- fail("Exception: " + e);
- }
-
- logger.info("testSaveMicroServiceModelsDictionary: exit");
- }
-
- @Test
- public void testRemoveMicroServiceModelsDictionary() {
- logger.info("testRemoveMicroServiceModelsDictionary: Entering");
-
- MockHttpServletResponse response = new MockHttpServletResponse();
- request = mock(HttpServletRequest.class);
-
- try {
- // mock the getReader() call
- jsonString = "{\"data\": {\"modelName\": \"test\", \"inprocess\": false,\"model\": {\"name\": \"testingdata\", "
- + " \"subScopename\": \"\",\"path\": [],\"type\": \"dir\",\"size\": 0,\"date\": \"2017-04-12T21:26:57.000Z\", "
- + " \"version\": \"\",\"createdBy\": \"someone\", \"modifiedBy\": \"someone\", \"content\": \"\",\"recursive\": false},"
- + " \"tempModel\": {\"name\": \"testingdata\",\"subScopename\": \"\" },"
- + " \"policy\": {\"policyType\": \"Config\",\"configPolicyType\": \"Micro Service\",\"policyName\": \"may1501\", "
- + " \"policyDescription\": \"testing input\", \"onapName\": \"RaviTest\",\"guard\": \"False\",\"riskType\": \"Risk12345\",\"riskLevel\": \"2\","
- + " \"priority\": \"6\",\"serviceType\": \"DkatPolicyBody\",\"version\": \"1707.41.02\",\"ruleGridData\": [ [\"fileId\"]],\"ttlDate\": null}}, "
- + " \"policyJSON\": {\"pmTableName\": \"test\", \"dmdTopic\": \"1\",\"fileId\": \"56\"} }";
-
- BufferedReader br = new BufferedReader(new StringReader(jsonString));
- when(request.getReader()).thenReturn(br);
- controller.removeMicroServiceModelsDictionary(request, response);
- logger.info("response.getContentAsString(): " + response.getContentAsString());
- assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceModelsDictionaryDatas"));
-
- } catch (Exception e) {
- fail("Exception: " + e);
- }
-
- logger.info("testRemoveMicroServiceModelsDictionary: exit");
- }
+ }
+
+
+ @Test
+ public void testSaveMicroServiceHeaderDefaultValues() {
+ logger.info("testSaveMicroServiceHeaderDefaultValues: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+ request = mock(HttpServletRequest.class);
+
+ try {
+ // mock the getReader() call
+ jsonString = "{\"modelAttributeDictionaryData\": {\"onapName\": \"test\", \"guard\": false,\"priority\": \"3\","
+ + " \"riskType\": \"test\", \"riskLevel\": \"7\", \"modelName\": \"testname\"}}";
+ BufferedReader br = new BufferedReader(new StringReader(jsonString));
+ when(request.getReader()).thenReturn(br);
+ controller.saveMicroServiceHeaderDefaultValues(request, response);
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceHeaderDefaultDatas"));
+
+ } catch (Exception e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testSaveMicroServiceHeaderDefaultValues: exit");
+ }
+
+
+ @Test
+ public void testGetMicroServiceHeaderDefaultsEntityDataByName() {
+ logger.info("testGetMicroServiceHeaderDefaultsEntityDataByName: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+
+ controller.getMicroServiceHeaderDefaultsEntityDataByName(response);
+
+ try {
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceHeaderDefaultDatas"));
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ } catch (UnsupportedEncodingException e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testGetMicroServiceHeaderDefaultsEntityDataByName: exit");
+ }
+
+ @Test
+ public void testGetMicroServiceHeaderDefaultsEntityData() {
+ logger.info("testGetMicroServiceHeaderDefaultsEntityData: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+
+ controller.getMicroServiceHeaderDefaultsEntityData(response);
+
+ try {
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceHeaderDefaultDatas"));
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ } catch (UnsupportedEncodingException e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testGetMicroServiceHeaderDefaultsEntityData: exit");
+ }
+
+ @Test
+ public void testRemoveMicroServiceHeaderDefaults() {
+ logger.info("testRemoveMicroServiceHeaderDefaults: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+ request = mock(HttpServletRequest.class);
+
+ try {
+ // mock the getReader() call
+ jsonString = "{\"data\": {\"modelName\": \"test\", \"inprocess\": false,\"model\": {\"name\": \"testingdata\", "
+ + " \"subScopename\": \"\",\"path\": [],\"type\": \"dir\",\"size\": 0,\"date\": \"2017-04-12T21:26:57.000Z\", "
+ + " \"version\": \"\",\"createdBy\": \"someone\", \"modifiedBy\": \"someone\", \"content\": \"\",\"recursive\": false},"
+ + " \"tempModel\": {\"name\": \"testingdata\",\"subScopename\": \"\" },"
+ + " \"policy\": {\"policyType\": \"Config\",\"configPolicyType\": \"Micro Service\",\"policyName\": \"may1501\", "
+ + " \"policyDescription\": \"testing input\", \"onapName\": \"RaviTest\",\"guard\": \"False\",\"riskType\": \"Risk12345\",\"riskLevel\": \"2\","
+ + " \"priority\": \"6\",\"serviceType\": \"DkatPolicyBody\",\"version\": \"1707.41.02\",\"ruleGridData\": [ [\"fileId\"]],\"ttlDate\": null}}, "
+ + " \"policyJSON\": {\"pmTableName\": \"test\", \"dmdTopic\": \"1\",\"fileId\": \"56\"} }";
+ BufferedReader br = new BufferedReader(new StringReader(jsonString));
+ when(request.getReader()).thenReturn(br);
+ controller.removeMicroServiceHeaderDefaults(request, response);
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceHeaderDefaultDatas"));
+
+ } catch (Exception e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testRemoveMicroServiceHeaderDefaults: exit");
+ }
+
+
+ @Test
+ public void testGetDCAEUUIDDictionaryByNameEntityData() {
+
+ logger.info("testGetDCAEUUIDDictionaryByNameEntityData: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+
+ controller.getDCAEUUIDDictionaryByNameEntityData(response);
+
+ try {
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("dcaeUUIDDictionaryDatas"));
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ } catch (UnsupportedEncodingException e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testGetDCAEUUIDDictionaryByNameEntityData: exit");
+ }
+
+ @Test
+ public void testGetDCAEUUIDDictionaryEntityData() {
+
+ logger.info("testGetDCAEUUIDDictionaryEntityData: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+
+ controller.getDCAEUUIDDictionaryEntityData(response);
+
+ try {
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("dcaeUUIDDictionaryDatas"));
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ } catch (UnsupportedEncodingException e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testGetDCAEUUIDDictionaryEntityData: exit");
+ }
+
+ @Test
+ public void testSaveDCAEUUIDDictionary() {
+ logger.info("testSaveDCAEUUIDDictionary: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+ request = mock(HttpServletRequest.class);
+
+ try {
+ // mock the getReader() call
+ jsonString = "{\"dcaeUUIDDictionaryData\": {\"modelName\": \"test\", \"inprocess\": false,\"model\": {\"name\": \"testingdata\", "
+ + " \"subScopename\": \"\",\"path\": [],\"type\": \"dir\",\"size\": 0,\"date\": \"2017-04-12T21:26:57.000Z\", "
+ + " \"version\": \"\",\"createdBy\": \"someone\", \"modifiedBy\": \"someone\", \"content\": \"\",\"recursive\": false},"
+ + " \"tempModel\": {\"name\": \"testingdata\",\"subScopename\": \"\" },"
+ + " \"policy\": {\"policyType\": \"Config\",\"configPolicyType\": \"Micro Service\",\"policyName\": \"may1501\", "
+ + " \"policyDescription\": \"testing input\", \"onapName\": \"RaviTest\",\"guard\": \"False\",\"riskType\": \"Risk12345\",\"riskLevel\": \"2\","
+ + " \"priority\": \"6\",\"serviceType\": \"DkatPolicyBody\",\"version\": \"1707.41.02\",\"ruleGridData\": [ [\"fileId\"]],\"ttlDate\": null}}, "
+ + " \"policyJSON\": {\"pmTableName\": \"test\", \"dmdTopic\": \"1\",\"fileId\": \"56\"} }";
+ BufferedReader br = new BufferedReader(new StringReader(jsonString));
+ when(request.getReader()).thenReturn(br);
+ controller.saveDCAEUUIDDictionary(request, response);
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("dcaeUUIDDictionaryDatas"));
+
+ } catch (Exception e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testSaveDCAEUUIDDictionary: exit");
+ }
+
+ @Test
+ public void testRemoveDCAEUUIDDictionary() {
+ logger.info("testRemoveDCAEUUIDDictionary: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+ request = mock(HttpServletRequest.class);
+
+ try {
+ // mock the getReader() call
+ jsonString = "{\"data\": {\"modelName\": \"test\", \"inprocess\": false,\"model\": {\"name\": \"testingdata\", "
+ + " \"subScopename\": \"\",\"path\": [],\"type\": \"dir\",\"size\": 0,\"date\": \"2017-04-12T21:26:57.000Z\", "
+ + " \"version\": \"\",\"createdBy\": \"someone\", \"modifiedBy\": \"someone\", \"content\": \"\",\"recursive\": false},"
+ + " \"tempModel\": {\"name\": \"testingdata\",\"subScopename\": \"\" },"
+ + " \"policy\": {\"policyType\": \"Config\",\"configPolicyType\": \"Micro Service\",\"policyName\": \"may1501\", "
+ + " \"policyDescription\": \"testing input\", \"onapName\": \"RaviTest\",\"guard\": \"False\",\"riskType\": \"Risk12345\",\"riskLevel\": \"2\","
+ + " \"priority\": \"6\",\"serviceType\": \"DkatPolicyBody\",\"version\": \"1707.41.02\",\"ruleGridData\": [ [\"fileId\"]],\"ttlDate\": null}}, "
+ + " \"policyJSON\": {\"pmTableName\": \"test\", \"dmdTopic\": \"1\",\"fileId\": \"56\"} }";
+ BufferedReader br = new BufferedReader(new StringReader(jsonString));
+ when(request.getReader()).thenReturn(br);
+ controller.removeMicroServiceConfigNameDictionary(request, response);
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceConfigNameDictionaryDatas"));
+
+ } catch (Exception e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testRemoveDCAEUUIDDictionary: exit");
+ }
+
+ @Test
+ public void testGetMicroServiceConfigNameByNameDictionaryEntityData() {
+ logger.info("testGetMicroServiceConfigNameByNameDictionaryEntityData: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+
+ controller.getMicroServiceConfigNameByNameDictionaryEntityData(response);
+
+ try {
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceConfigNameDictionaryDatas"));
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ } catch (UnsupportedEncodingException e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testGetMicroServiceConfigNameByNameDictionaryEntityData: exit");
+ }
+
+ @Test
+ public void testGetMicroServiceConfigNameDictionaryEntityData() {
+ logger.info("testGetMicroServiceConfigNameByNameDictionaryEntityData: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+
+ controller.getMicroServiceConfigNameDictionaryEntityData(response);
+
+ try {
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceConfigNameDictionaryDatas"));
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ } catch (UnsupportedEncodingException e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testGetMicroServiceConfigNameDictionaryEntityData: exit");
+ }
+
+ @Test
+ public void testSaveMicroServiceConfigNameDictionary() {
+ logger.info("testSaveMicroServiceConfigNameDictionary: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+ request = mock(HttpServletRequest.class);
+
+ try {
+ // mock the getReader() call
+ jsonString = "{\"microServiceConfigNameDictionaryData\": {\"modelName\": \"test\", \"inprocess\": false,\"model\": {\"name\": \"testingdata\", "
+ + " \"subScopename\": \"\",\"path\": [],\"type\": \"dir\",\"size\": 0,\"date\": \"2017-04-12T21:26:57.000Z\", "
+ + " \"version\": \"\",\"createdBy\": \"someone\", \"modifiedBy\": \"someone\", \"content\": \"\",\"recursive\": false},"
+ + " \"tempModel\": {\"name\": \"testingdata\",\"subScopename\": \"\" },"
+ + " \"policy\": {\"policyType\": \"Config\",\"configPolicyType\": \"Micro Service\",\"policyName\": \"may1501\", "
+ + " \"policyDescription\": \"testing input\", \"onapName\": \"RaviTest\",\"guard\": \"False\",\"riskType\": \"Risk12345\",\"riskLevel\": \"2\","
+ + " \"priority\": \"6\",\"serviceType\": \"DkatPolicyBody\",\"version\": \"1707.41.02\",\"ruleGridData\": [ [\"fileId\"]],\"ttlDate\": null}}, "
+ + " \"policyJSON\": {\"pmTableName\": \"test\", \"dmdTopic\": \"1\",\"fileId\": \"56\"} }";
+ BufferedReader br = new BufferedReader(new StringReader(jsonString));
+ when(request.getReader()).thenReturn(br);
+ controller.saveMicroServiceConfigNameDictionary(request, response);
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceConfigNameDictionaryDatas"));
+
+ } catch (Exception e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testSaveMicroServiceConfigNameDictionary: exit");
+ }
+
+ @Test
+ public void testRemoveMicroServiceConfigNameDictionary() {
+ logger.info("testRemoveMicroServiceConfigNameDictionary: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+ request = mock(HttpServletRequest.class);
+
+ try {
+ // mock the getReader() call
+ jsonString = "{\"data\": {\"modelName\": \"test\", \"inprocess\": false,\"model\": {\"name\": \"testingdata\", "
+ + " \"subScopename\": \"\",\"path\": [],\"type\": \"dir\",\"size\": 0,\"date\": \"2017-04-12T21:26:57.000Z\", "
+ + " \"version\": \"\",\"createdBy\": \"someone\", \"modifiedBy\": \"someone\", \"content\": \"\",\"recursive\": false},"
+ + " \"tempModel\": {\"name\": \"testingdata\",\"subScopename\": \"\" },"
+ + " \"policy\": {\"policyType\": \"Config\",\"configPolicyType\": \"Micro Service\",\"policyName\": \"may1501\", "
+ + " \"policyDescription\": \"testing input\", \"onapName\": \"RaviTest\",\"guard\": \"False\",\"riskType\": \"Risk12345\",\"riskLevel\": \"2\","
+ + " \"priority\": \"6\",\"serviceType\": \"DkatPolicyBody\",\"version\": \"1707.41.02\",\"ruleGridData\": [ [\"fileId\"]],\"ttlDate\": null}}, "
+ + " \"policyJSON\": {\"pmTableName\": \"test\", \"dmdTopic\": \"1\",\"fileId\": \"56\"} }";
+ BufferedReader br = new BufferedReader(new StringReader(jsonString));
+ when(request.getReader()).thenReturn(br);
+ controller.removeMicroServiceConfigNameDictionary(request, response);
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceConfigNameDictionaryDatas"));
+
+ } catch (Exception e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testRemoveMicroServiceConfigNameDictionary: exit");
+ }
+
+ @Test
+ public void testGetMicroServiceLocationByNameDictionaryEntityData() {
+
+ logger.info("testGetMicroServiceLocationByNameDictionaryEntityData: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+
+ controller.getMicroServiceLocationByNameDictionaryEntityData(response);
+
+ try {
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceLocationDictionaryDatas"));
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ } catch (UnsupportedEncodingException e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testGetMicroServiceLocationByNameDictionaryEntityData: exit");
+ }
+
+ @Test
+ public void testGetMicroServiceLocationDictionaryEntityData() {
+ logger.info("testGetMicroServiceLocationDictionaryEntityData: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+
+ controller.getMicroServiceLocationDictionaryEntityData(response);
+
+ try {
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceLocationDictionaryDatas"));
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ } catch (UnsupportedEncodingException e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testGetMicroServiceLocationDictionaryEntityData: exit");
+ }
+
+ @Test
+ public void testSaveMicroServiceLocationDictionary() {
+ logger.info("testSaveMicroServiceLocationDictionary: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+ request = mock(HttpServletRequest.class);
+
+ try {
+ // mock the getReader() call
+ jsonString = "{\"microServiceLocationDictionaryData\": {\"modelName\": \"test\", \"inprocess\": false,\"model\": {\"name\": \"testingdata\", "
+ + " \"subScopename\": \"\",\"path\": [],\"type\": \"dir\",\"size\": 0,\"date\": \"2017-04-12T21:26:57.000Z\", "
+ + " \"version\": \"\",\"createdBy\": \"someone\", \"modifiedBy\": \"someone\", \"content\": \"\",\"recursive\": false},"
+ + " \"tempModel\": {\"name\": \"testingdata\",\"subScopename\": \"\" },"
+ + " \"policy\": {\"policyType\": \"Config\",\"configPolicyType\": \"Micro Service\",\"policyName\": \"may1501\", "
+ + " \"policyDescription\": \"testing input\", \"onapName\": \"RaviTest\",\"guard\": \"False\",\"riskType\": \"Risk12345\",\"riskLevel\": \"2\","
+ + " \"priority\": \"6\",\"serviceType\": \"DkatPolicyBody\",\"version\": \"1707.41.02\",\"ruleGridData\": [ [\"fileId\"]],\"ttlDate\": null}}, "
+ + " \"policyJSON\": {\"pmTableName\": \"test\", \"dmdTopic\": \"1\",\"fileId\": \"56\"} }";
+ BufferedReader br = new BufferedReader(new StringReader(jsonString));
+ when(request.getReader()).thenReturn(br);
+ controller.saveMicroServiceLocationDictionary(request, response);
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceLocationDictionaryDatas"));
+
+ } catch (Exception e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testSaveMicroServiceLocationDictionary: exit");
+ }
+
+ @Test
+ public void testRemoveMicroServiceLocationDictionary() {
+ logger.info("testRemoveMicroServiceLocationDictionary: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+ request = mock(HttpServletRequest.class);
+
+ try {
+ // mock the getReader() call
+ jsonString = "{\"data\": {\"modelName\": \"test\", \"inprocess\": false,\"model\": {\"name\": \"testingdata\", "
+ + " \"subScopename\": \"\",\"path\": [],\"type\": \"dir\",\"size\": 0,\"date\": \"2017-04-12T21:26:57.000Z\", "
+ + " \"version\": \"\",\"createdBy\": \"someone\", \"modifiedBy\": \"someone\", \"content\": \"\",\"recursive\": false},"
+ + " \"tempModel\": {\"name\": \"testingdata\",\"subScopename\": \"\" },"
+ + " \"policy\": {\"policyType\": \"Config\",\"configPolicyType\": \"Micro Service\",\"policyName\": \"may1501\", "
+ + " \"policyDescription\": \"testing input\", \"onapName\": \"RaviTest\",\"guard\": \"False\",\"riskType\": \"Risk12345\",\"riskLevel\": \"2\","
+ + " \"priority\": \"6\",\"serviceType\": \"DkatPolicyBody\",\"version\": \"1707.41.02\",\"ruleGridData\": [ [\"fileId\"]],\"ttlDate\": null}}, "
+ + " \"policyJSON\": {\"pmTableName\": \"test\", \"dmdTopic\": \"1\",\"fileId\": \"56\"} }";
+ BufferedReader br = new BufferedReader(new StringReader(jsonString));
+
+ when(request.getReader()).thenReturn(br);
+ controller.removeMicroServiceLocationDictionary(request, response);
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceLocationDictionaryDatas"));
+
+ } catch (Exception e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testRemoveMicroServiceLocationDictionary: exit");
+ }
+
+ @Test
+ public void testGetMicroServiceAttributeByNameDictionaryEntityData() {
+ logger.info("testGetMicroServiceAttributeByNameDictionaryEntityData: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+
+ controller.getMicroServiceAttributeByNameDictionaryEntityData(response);
+
+ try {
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceAttributeDictionaryDatas"));
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ } catch (UnsupportedEncodingException e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testGetMicroServiceAttributeByNameDictionaryEntityData: exit");
+ }
+
+ @Test
+ public void testGetMicroServiceAttributeDictionaryEntityData() {
+ logger.info("testGetMicroServiceAttributeDictionaryEntityData: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+
+ controller.getMicroServiceAttributeDictionaryEntityData(response);
+
+ try {
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceAttributeDictionaryDatas"));
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ } catch (UnsupportedEncodingException e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testGetMicroServiceAttributeDictionaryEntityData: exit");
+ }
+
+ @Test
+ public void testSaveMicroServiceAttributeDictionary() {
+ logger.info("testSaveMicroServiceAttributeDictionary: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+ request = mock(HttpServletRequest.class);
+
+ try {
+ // mock the getReader() call
+ jsonString = "{\"modelAttributeDictionaryData\": {\"modelName\": \"test\", \"inprocess\": false,\"model\": {\"name\": \"testingdata\", "
+ + " \"subScopename\": \"\",\"path\": [],\"type\": \"dir\",\"size\": 0,\"date\": \"2017-04-12T21:26:57.000Z\", "
+ + " \"version\": \"\",\"createdBy\": \"someone\", \"modifiedBy\": \"someone\", \"content\": \"\",\"recursive\": false},"
+ + " \"tempModel\": {\"name\": \"testingdata\",\"subScopename\": \"\" },"
+ + " \"policy\": {\"policyType\": \"Config\",\"configPolicyType\": \"Micro Service\",\"policyName\": \"may1501\", "
+ + " \"policyDescription\": \"testing input\", \"onapName\": \"RaviTest\",\"guard\": \"False\",\"riskType\": \"Risk12345\",\"riskLevel\": \"2\","
+ + " \"priority\": \"6\",\"serviceType\": \"DkatPolicyBody\",\"version\": \"1707.41.02\",\"ruleGridData\": [ [\"fileId\"]],\"ttlDate\": null}}, "
+ + " \"policyJSON\": {\"pmTableName\": \"test\", \"dmdTopic\": \"1\",\"fileId\": \"56\"} }";
+ BufferedReader br = new BufferedReader(new StringReader(jsonString));
+ when(request.getReader()).thenReturn(br);
+ controller.saveMicroServiceAttributeDictionary(request, response);
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceAttributeDictionaryDatas"));
+
+ } catch (Exception e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testSaveMicroServiceAttributeDictionary: exit");
+ }
+
+ @Test
+ public void testRemoveMicroServiceAttributeDictionary() {
+ logger.info("testRemoveMicroServiceAttributeDictionary: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+ request = mock(HttpServletRequest.class);
+
+ try {
+ // mock the getReader() call
+ jsonString = "{\"data\": {\"modelName\": \"test\", \"inprocess\": false,\"model\": {\"name\": \"testingdata\", "
+ + " \"subScopename\": \"\",\"path\": [],\"type\": \"dir\",\"size\": 0,\"date\": \"2017-04-12T21:26:57.000Z\", "
+ + " \"version\": \"\",\"createdBy\": \"someone\", \"modifiedBy\": \"someone\", \"content\": \"\",\"recursive\": false},"
+ + " \"tempModel\": {\"name\": \"testingdata\",\"subScopename\": \"\" },"
+ + " \"policy\": {\"policyType\": \"Config\",\"configPolicyType\": \"Micro Service\",\"policyName\": \"may1501\", "
+ + " \"policyDescription\": \"testing input\", \"onapName\": \"RaviTest\",\"guard\": \"False\",\"riskType\": \"Risk12345\",\"riskLevel\": \"2\","
+ + " \"priority\": \"6\",\"serviceType\": \"DkatPolicyBody\",\"version\": \"1707.41.02\",\"ruleGridData\": [ [\"fileId\"]],\"ttlDate\": null}}, "
+ + " \"policyJSON\": {\"pmTableName\": \"test\", \"dmdTopic\": \"1\",\"fileId\": \"56\"} }";
+ BufferedReader br = new BufferedReader(new StringReader(jsonString));
+ when(request.getReader()).thenReturn(br);
+ controller.removeMicroServiceAttributeDictionary(request, response);
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceAttributeDictionaryDatas"));
+
+ } catch (Exception e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testRemoveMicroServiceAttributeDictionary: exit");
+ }
+
+ @Test
+ public void testGetMicroServiceModelsDictionaryByNameEntityData() {
+ logger.info("testGetMicroServiceModelsDictionaryByNameEntityData: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+
+ controller.getMicroServiceModelsDictionaryByNameEntityData(response);
+
+ try {
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceModelsDictionaryDatas"));
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ } catch (UnsupportedEncodingException e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testGetMicroServiceModelsDictionaryByNameEntityData: exit");
+ }
+
+ @Test
+ public void testGetMicroServiceModelsDictionaryByVersionEntityData() {
+ logger.info("testGetMicroServiceModelsDictionaryByVersionEntityData: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+ String msModelJson = "{\"microServiceModelsDictionaryData\":[\"modelName\"]}";
+
+ BufferedReader br = new BufferedReader(new StringReader(msModelJson));
+ request = mock(HttpServletRequest.class);
+
+ try {
+ // mock the getReader() call
+ when(request.getReader()).thenReturn(br);
+ controller.getMicroServiceModelsDictionaryByVersionEntityData(request, response);
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("No model name given"));
+
+ } catch (Exception e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testGetMicroServiceModelsDictionaryByVersionEntityData: exit");
+ }
+
+ @Test
+ public void testGetMicroServiceModelsDictionaryEntityData() {
+ logger.info("testGetMicroServiceModelsDictionaryEntityData: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+ String msModelJson = "{\"microServiceModelsDictionaryData\":[\"modelName\"]}";
+
+ BufferedReader br = new BufferedReader(new StringReader(msModelJson));
+ request = mock(HttpServletRequest.class);
+
+ try {
+ // mock the getReader() call
+ when(request.getReader()).thenReturn(br);
+ controller.getMicroServiceModelsDictionaryEntityData(response);
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceModelsDictionaryDatas"));
+
+ } catch (Exception e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testGetMicroServiceModelsDictionaryEntityData: exit");
+ }
+
+ @Test
+ public void testGetMicroServiceModelsDictionaryEntityDataServiceVersion() {
+ logger.info("testGetMicroServiceModelsDictionaryEntityDataServiceVersion: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+ String msModelJson = "{\"microServiceModelsDictionaryData\":[\"modelName\"]}";
+
+ BufferedReader br = new BufferedReader(new StringReader(msModelJson));
+ request = mock(HttpServletRequest.class);
+
+ try {
+ // mock the getReader() call
+ when(request.getReader()).thenReturn(br);
+ controller.getMicroServiceModelsDictionaryEntityDataServiceVersion(response);
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceModelsDictionaryDatas"));
+
+ } catch (Exception e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testGetMicroServiceModelsDictionaryEntityDataServiceVersion: exit");
+ }
+
+ @Test
+ public void testGetMicroServiceModelsDictionaryClassEntityData() {
+ logger.info("testGetMicroServiceModelsDictionaryClassEntityData: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+ String msModelJson = "{\"microServiceModelsDictionaryData\":[\"modelName\"]}";
+
+ BufferedReader br = new BufferedReader(new StringReader(msModelJson));
+ request = mock(HttpServletRequest.class);
+
+ try {
+ // mock the getReader() call
+ when(request.getReader()).thenReturn(br);
+ controller.getMicroServiceModelsDictionaryClassEntityData(response);
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceModelsDictionaryClassDatas"));
+
+ } catch (Exception e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testGetMicroServiceModelsDictionaryClassEntityData: exit");
+ }
+
+ @Test
+ public void testSaveMicroServiceModelsDictionary() {
+ logger.info("testSaveMicroServiceModelsDictionary: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+ request = mock(HttpServletRequest.class);
+
+ try {
+ // mock the getReader() call
+ when(request.getReader()).thenReturn(br);
+ controller.saveMicroServiceModelsDictionary(request, response);
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceModelsDictionaryDatas"));
+
+ } catch (Exception e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testSaveMicroServiceModelsDictionary: exit");
+ }
+
+ @Test
+ public void testRemoveMicroServiceModelsDictionary() {
+ logger.info("testRemoveMicroServiceModelsDictionary: Entering");
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+ request = mock(HttpServletRequest.class);
+
+ try {
+ // mock the getReader() call
+ jsonString = "{\"data\": {\"modelName\": \"test\", \"inprocess\": false,\"model\": {\"name\": \"testingdata\", "
+ + " \"subScopename\": \"\",\"path\": [],\"type\": \"dir\",\"size\": 0,\"date\": \"2017-04-12T21:26:57.000Z\", "
+ + " \"version\": \"\",\"createdBy\": \"someone\", \"modifiedBy\": \"someone\", \"content\": \"\",\"recursive\": false},"
+ + " \"tempModel\": {\"name\": \"testingdata\",\"subScopename\": \"\" },"
+ + " \"policy\": {\"policyType\": \"Config\",\"configPolicyType\": \"Micro Service\",\"policyName\": \"may1501\", "
+ + " \"policyDescription\": \"testing input\", \"onapName\": \"RaviTest\",\"guard\": \"False\",\"riskType\": \"Risk12345\",\"riskLevel\": \"2\","
+ + " \"priority\": \"6\",\"serviceType\": \"DkatPolicyBody\",\"version\": \"1707.41.02\",\"ruleGridData\": [ [\"fileId\"]],\"ttlDate\": null}}, "
+ + " \"policyJSON\": {\"pmTableName\": \"test\", \"dmdTopic\": \"1\",\"fileId\": \"56\"} }";
+
+ BufferedReader br = new BufferedReader(new StringReader(jsonString));
+ when(request.getReader()).thenReturn(br);
+ controller.removeMicroServiceModelsDictionary(request, response);
+ logger.info("response.getContentAsString(): " + response.getContentAsString());
+ assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceModelsDictionaryDatas"));
+
+ } catch (Exception e) {
+ fail("Exception: " + e);
+ }
+
+ logger.info("testRemoveMicroServiceModelsDictionary: exit");
+ }
}