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>
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();
}
]
},
+ "site-resources1": {
+ "site-resource": [
+ ]
+ },
"499hkg9933NNN": {
"site-resource-id": "3801b392-f596-4f7b-93d6-4d0a33b014bc",
"site-resource-name": "HkHubONSDEMOBJHKCustomer",
]
}
}
-}
\ No newline at end of file
+}