- new MicroServiceDictionaryController(commonClassDao);
- new PolicyScopeDictionaryController(commonClassDao);
- httpServletRequest = Mockito.mock(HttpServletRequest.class);
- httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
- String json = "{\"dictionaryFields\":{\"name\":\"testMMrestAPI1\",\"descriptionValue\":\"test\"}}";
- dictionaryTestSetup(false, "MicroServiceLocation", json);
- // send Request to PAP
- pap.service(httpServletRequest, httpServletResponse);
- // Verify
- Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
-
- httpServletRequest = Mockito.mock(HttpServletRequest.class);
- httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
- json = "{\"dictionaryFields\":{\"name\":\"testMMrestAPI1\",\"descriptionValue\":\"test\"}}";
- dictionaryTestSetup(false, "MicroServiceConfigName", json);
- // send Request to PAP
- pap.service(httpServletRequest, httpServletResponse);
- // Verify
- Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
-
- httpServletRequest = Mockito.mock(HttpServletRequest.class);
- httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
- json = "{\"dictionaryFields\":{\"name\":\"testMMrestAPI1\",\"description\":\"test\"}}";
- dictionaryTestSetup(false, "DCAEUUID", json);
- // send Request to PAP
- pap.service(httpServletRequest, httpServletResponse);
- // Verify
- Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
-
- httpServletRequest = Mockito.mock(HttpServletRequest.class);
- httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
- json = "{\"dictionaryFields\":{\"name\":\"testApiANY\",\"descriptionValue\":\"default test\"}}";
- dictionaryTestSetup(false, "PolicyScopeService", json);
- // send Request to PAP
- pap.service(httpServletRequest, httpServletResponse);
- // Verify
- Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
-
- httpServletRequest = Mockito.mock(HttpServletRequest.class);
- httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
- json = "{\"dictionaryFields\":{\"name\":\"testApiANY\",\"descriptionValue\":\"default test\"}}";
- dictionaryTestSetup(false, "PolicyScopeResource", json);
- // send Request to PAP
- pap.service(httpServletRequest, httpServletResponse);
- // Verify
- Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
-
- httpServletRequest = Mockito.mock(HttpServletRequest.class);
- httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
- json = "{\"dictionaryFields\":{\"name\":\"testApiANY\",\"descriptionValue\":\"default test\"}}";
- dictionaryTestSetup(false, "PolicyScopeType", json);
- // send Request to PAP
- pap.service(httpServletRequest, httpServletResponse);
- // Verify
- Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
-
- httpServletRequest = Mockito.mock(HttpServletRequest.class);
- httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
- json = "{\"dictionaryFields\":{\"name\":\"testApiANY\",\"descriptionValue\":\"default test\"}}";
- dictionaryTestSetup(false, "PolicyScopeClosedLoop", json);
- // send Request to PAP
- pap.service(httpServletRequest, httpServletResponse);
- // Verify
- Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
-
- httpServletRequest = Mockito.mock(HttpServletRequest.class);
- httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
- json = "{\"dictionaryFields\":{\"groupName\":\"testMMrestAPI1\",\"description\":\"testing\"},\"groupPolicyScopeListData1\":{\"resource\":\"ANY\",\"type\":\"ANY\",\"service\":\"ANY\",\"closedloop\":\"ANY\"}}";
- dictionaryTestSetup(false, "GroupPolicyScopeList", json);
- // send Request to PAP
- pap.service(httpServletRequest, httpServletResponse);
- // Verify
- Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
+ new MicroServiceDictionaryController(commonClassDao);
+ new PolicyScopeDictionaryController(commonClassDao);
+ httpServletRequest = Mockito.mock(HttpServletRequest.class);
+ httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
+ String json = "{\"dictionaryFields\":{\"name\":\"testMMrestAPI1\",\"descriptionValue\":\"test\"}}";
+ dictionaryTestSetup(false, "MicroServiceLocation", json);
+ // send Request to PAP
+ pap.service(httpServletRequest, httpServletResponse);
+ // Verify
+ Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
+
+ httpServletRequest = Mockito.mock(HttpServletRequest.class);
+ httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
+ json = "{\"dictionaryFields\":{\"name\":\"testMMrestAPI1\",\"descriptionValue\":\"test\"}}";
+ dictionaryTestSetup(false, "MicroServiceConfigName", json);
+ // send Request to PAP
+ pap.service(httpServletRequest, httpServletResponse);
+ // Verify
+ Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
+
+ httpServletRequest = Mockito.mock(HttpServletRequest.class);
+ httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
+ json = "{\"dictionaryFields\":{\"name\":\"testMMrestAPI1\",\"description\":\"test\"}}";
+ dictionaryTestSetup(false, "DCAEUUID", json);
+ // send Request to PAP
+ pap.service(httpServletRequest, httpServletResponse);
+ // Verify
+ Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
+
+ httpServletRequest = Mockito.mock(HttpServletRequest.class);
+ httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
+ json = "{\"dictionaryFields\":{\"name\":\"testApiANY\",\"descriptionValue\":\"default test\"}}";
+ dictionaryTestSetup(false, "PolicyScopeService", json);
+ // send Request to PAP
+ pap.service(httpServletRequest, httpServletResponse);
+ // Verify
+ Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
+
+ httpServletRequest = Mockito.mock(HttpServletRequest.class);
+ httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
+ json = "{\"dictionaryFields\":{\"name\":\"testApiANY\",\"descriptionValue\":\"default test\"}}";
+ dictionaryTestSetup(false, "PolicyScopeResource", json);
+ // send Request to PAP
+ pap.service(httpServletRequest, httpServletResponse);
+ // Verify
+ Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
+
+ httpServletRequest = Mockito.mock(HttpServletRequest.class);
+ httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
+ json = "{\"dictionaryFields\":{\"name\":\"testApiANY\",\"descriptionValue\":\"default test\"}}";
+ dictionaryTestSetup(false, "PolicyScopeType", json);
+ // send Request to PAP
+ pap.service(httpServletRequest, httpServletResponse);
+ // Verify
+ Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
+
+ httpServletRequest = Mockito.mock(HttpServletRequest.class);
+ httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
+ json = "{\"dictionaryFields\":{\"name\":\"testApiANY\",\"descriptionValue\":\"default test\"}}";
+ dictionaryTestSetup(false, "PolicyScopeClosedLoop", json);
+ // send Request to PAP
+ pap.service(httpServletRequest, httpServletResponse);
+ // Verify
+ Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
+
+ httpServletRequest = Mockito.mock(HttpServletRequest.class);
+ httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
+ json =
+ "{\"dictionaryFields\":{\"groupName\":\"testMMrestAPI1\",\"description\":\"testing\"}," +
+ "\"groupPolicyScopeListData1\":{\"resource\":\"ANY\",\"type\":\"ANY\",\"service\":\"ANY\"," +
+ "\"closedloop\":\"ANY\"}}";
+ dictionaryTestSetup(false, "GroupPolicyScopeList", json);
+ // send Request to PAP
+ pap.service(httpServletRequest, httpServletResponse);
+ // Verify
+ Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);