Update AAI Assistant Tools for CCVPN Extenstion
[holmes/common.git] / holmes-actions / src / test / java / org / onap / holmes / common / aai / AaiQuery4Ccvpn2Test.java
index 1fca1da..cd1d505 100644 (file)
@@ -140,6 +140,28 @@ public class AaiQuery4Ccvpn2Test {
         PowerMock.verifyAll();
     }
 
+    @Test
+    public void test_getServiceInstancesNull_exception() throws CorrelationException {
+        mockGetMethod();
+        EasyMock.expect(response.readEntity(String.class)).andReturn(data.getJSONObject("site-resources1").toJSONString
+                ());
+        EasyMock.expect(response.getStatusInfo()).andReturn(Response.Status.OK);
+
+        mockGetMethod();
+        EasyMock.expect(response.readEntity(String.class)).andReturn(data.getJSONObject("499hkg9933NNN").toJSONString
+                ());
+        EasyMock.expect(response.getStatusInfo()).andReturn(Response.Status.OK);
+
+        mockGetMethod();
+        EasyMock.expect(response.readEntity(String.class)).andReturn(data.getJSONObject("499hkg9933NNN").toJSONString
+                ());
+        EasyMock.expect(response.getStatusInfo()).andReturn(Response.Status.OK);
+
+        PowerMock.replayAll();
+
+        aai.getSiteServiceInstance("HkHubONSDEMOSZHKCustomer");
+    }
+
 
     private void mockGetMethod() {
         initCommonMock();