+
+ @Test
+ public void test_queryComplexes() throws ExtsysException {
+ CloudRegionProxy mockCloudRegionProxy = Mockito.mock(CloudRegionProxy.class);
+ VimManagerProxy mockVimManagerProxy = Mockito.mock(VimManagerProxy.class);
+ String complexListStr =
+ "{\"complex\": [{\"physical-location-id\": \"123\",\"complex-name\": \"complex1\"},"
+ + "{\"physical-location-id\": \"test\",\"complex-name\": \"complex\"}]}";
+ Mockito.when(mockCloudRegionProxy.qureyComplexes()).thenReturn(complexListStr);
+ VimManagerWrapper vimManagerWrapper = new VimManagerWrapper(mockCloudRegionProxy, mockVimManagerProxy);
+ Response response = vimManagerWrapper.queryComplexes();
+ if (response != null) {
+ Assert.assertTrue(response.getStatus() == 200);
+ }
+ }