summaryrefslogtreecommitdiffstats
path: root/holmes-actions/src/test/java
diff options
context:
space:
mode:
authorRama-Huawei <rama.subba.reddy.s@huawei.com>2019-04-16 12:26:13 +0530
committerRama-Huawei <rama.subba.reddy.s@huawei.com>2019-04-16 12:26:13 +0530
commit71432f8c9cdd5fb4b2eded82f271e90a1e603fca (patch)
tree93fba3aaffa2a43d356ab3dc8fb228e30f364b83 /holmes-actions/src/test/java
parent587fb47efbbee8ef3442323cec61cce046c67fbb (diff)
Update AAI Assistant Tools for CCVPN Extenstion
Increased CCVPN extension code coverage to 100% Issue-ID: HOLMES-194 Change-Id: Ib75bff68a08ddd0bee276aafa922d3cb3cb8c435 Signed-off-by: Rama-Huawei <rama.subba.reddy.s@huawei.com>
Diffstat (limited to 'holmes-actions/src/test/java')
-rw-r--r--holmes-actions/src/test/java/org/onap/holmes/common/aai/AaiQuery4Ccvpn2Test.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/holmes-actions/src/test/java/org/onap/holmes/common/aai/AaiQuery4Ccvpn2Test.java b/holmes-actions/src/test/java/org/onap/holmes/common/aai/AaiQuery4Ccvpn2Test.java
index 1fca1da..cd1d505 100644
--- a/holmes-actions/src/test/java/org/onap/holmes/common/aai/AaiQuery4Ccvpn2Test.java
+++ b/holmes-actions/src/test/java/org/onap/holmes/common/aai/AaiQuery4Ccvpn2Test.java
@@ -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();