headers.put("X-FromAppId", AaiConfig.X_FROMAPP_ID);
headers.put("Authorization", AaiConfig.getAuthenticationCredentials());
headers.put("Accept", "application/json");
headers.put("X-FromAppId", AaiConfig.X_FROMAPP_ID);
headers.put("Authorization", AaiConfig.getAuthenticationCredentials());
headers.put("Accept", "application/json");
when(HttpsUtils.get(url, headers)).thenReturn("{}");
PowerMockito.mockStatic(MicroServiceConfig.class);
when(HttpsUtils.get(url, headers)).thenReturn("{}");
PowerMockito.mockStatic(MicroServiceConfig.class);
- PowerMock.expectPrivate(aaiQuery, "getVmResourceLinks", "test1", "test2").andReturn("");
+ PowerMock.expectPrivate(aaiQuery, "getVmResourceLinks", "test1", "test2")
+ .andReturn("/aai/v11/cloud-infrastructure");
PowerMock.replayAll();
VmEntity vmEntity = Whitebox.invokeMethod(aaiQuery, "getAaiVmData", "test1", "test2");
PowerMock.verifyAll();
PowerMock.replayAll();
VmEntity vmEntity = Whitebox.invokeMethod(aaiQuery, "getAaiVmData", "test1", "test2");
PowerMock.verifyAll();
headers.put("X-FromAppId", AaiConfig.X_FROMAPP_ID);
headers.put("Authorization", AaiConfig.getAuthenticationCredentials());
headers.put("Accept", "application/json");
headers.put("X-FromAppId", AaiConfig.X_FROMAPP_ID);
headers.put("Authorization", AaiConfig.getAuthenticationCredentials());
headers.put("Accept", "application/json");
when(HttpsUtils.get(url, headers)).thenReturn("");
PowerMockito.mockStatic(MicroServiceConfig.class);
when(HttpsUtils.get(url, headers)).thenReturn("");
PowerMockito.mockStatic(MicroServiceConfig.class);
- PowerMock.expectPrivate(aaiQuery, "getVmResourceLinks", "test1", "test2").andReturn("");
+ PowerMock.expectPrivate(aaiQuery, "getVmResourceLinks", "test1", "test2")
+ .andReturn("/aai/v11/cloud-infrastructure");
PowerMock.replayAll();
Whitebox.invokeMethod(aaiQuery, "getAaiVmData", "test1", "test2");
PowerMock.replayAll();
Whitebox.invokeMethod(aaiQuery, "getAaiVmData", "test1", "test2");
headers.put("X-FromAppId", AaiConfig.X_FROMAPP_ID);
headers.put("Authorization", AaiConfig.getAuthenticationCredentials());
headers.put("Accept", "application/json");
headers.put("X-FromAppId", AaiConfig.X_FROMAPP_ID);
headers.put("Authorization", AaiConfig.getAuthenticationCredentials());
headers.put("Accept", "application/json");
when(HttpsUtils.get(url, headers)).thenThrow(new CorrelationException(""));
PowerMockito.mockStatic(MicroServiceConfig.class);
when(HttpsUtils.get(url, headers)).thenThrow(new CorrelationException(""));
PowerMockito.mockStatic(MicroServiceConfig.class);
- PowerMock.expectPrivate(aaiQuery, "getVmResourceLinks", "test1", "test2").andReturn("");
+ PowerMock.expectPrivate(aaiQuery, "getVmResourceLinks", "test1", "test2")
+ .andReturn("/aai/v11/cloud-infrastructure");
PowerMock.replayAll();
Whitebox.invokeMethod(aaiQuery, "getAaiVmData", "test1", "test2");
PowerMock.verifyAll();
PowerMock.replayAll();
Whitebox.invokeMethod(aaiQuery, "getAaiVmData", "test1", "test2");
PowerMock.verifyAll();
headers.put("Authorization", AaiConfig.getAuthenticationCredentials());
headers.put("Accept", "application/json");
String url = "host_url";
headers.put("Authorization", AaiConfig.getAuthenticationCredentials());
headers.put("Accept", "application/json");
String url = "host_url";
String actual = Whitebox.invokeMethod(aaiQuery,"getBaseUrl", "url");
System.out.println(actual);
PowerMock.verifyAll();
String actual = Whitebox.invokeMethod(aaiQuery,"getBaseUrl", "url");
System.out.println(actual);
PowerMock.verifyAll();
public void testAaiQuery_getMsbSuffixAddr_Ok() throws Exception {
PowerMock.resetAll();
String url = "/aai/v11/network/generic-vnfs/generic-vnf?";
public void testAaiQuery_getMsbSuffixAddr_Ok() throws Exception {
PowerMock.resetAll();
String url = "/aai/v11/network/generic-vnfs/generic-vnf?";
aaiQuery = new AaiQuery();
PowerMock.replayAll();
String actual = Whitebox.invokeMethod(aaiQuery, "getMsbSuffixAddr", url);
aaiQuery = new AaiQuery();
PowerMock.replayAll();
String actual = Whitebox.invokeMethod(aaiQuery, "getMsbSuffixAddr", url);