diff options
Diffstat (limited to 'vid-app-common/src/test/java/org/onap/vid/aai/PombaRestInterfaceTest.java')
-rw-r--r-- | vid-app-common/src/test/java/org/onap/vid/aai/PombaRestInterfaceTest.java | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/PombaRestInterfaceTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/PombaRestInterfaceTest.java index b409c1f46..5de993c73 100644 --- a/vid-app-common/src/test/java/org/onap/vid/aai/PombaRestInterfaceTest.java +++ b/vid-app-common/src/test/java/org/onap/vid/aai/PombaRestInterfaceTest.java @@ -20,30 +20,9 @@ package org.onap.vid.aai; -import org.mockito.Mock; -import org.onap.vid.aai.util.HttpClientMode; -import org.onap.vid.aai.util.HttpsAuthClient; -import org.onap.vid.aai.util.ServletRequestHelper; -import org.onap.vid.aai.util.SystemPropertyHelper; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; - -import javax.ws.rs.client.Client; -import javax.ws.rs.client.Entity; -import javax.ws.rs.client.Invocation; -import javax.ws.rs.client.WebTarget; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - -import java.io.IOException; -import java.security.GeneralSecurityException; -import java.util.UUID; -import java.util.regex.Pattern; - import static org.assertj.core.api.Assertions.assertThat; - -import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.matches; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.verify; @@ -53,6 +32,25 @@ import static org.onap.vid.aai.AaiOverTLSClientInterface.HEADERS.FROM_APP_ID_HEA import static org.onap.vid.aai.AaiOverTLSClientInterface.HEADERS.TRANSACTION_ID_HEADER; import static org.onap.vid.utils.Logging.REQUEST_ID_HEADER_KEY; +import java.io.IOException; +import java.security.GeneralSecurityException; +import java.util.UUID; +import java.util.regex.Pattern; +import javax.ws.rs.client.Client; +import javax.ws.rs.client.Entity; +import javax.ws.rs.client.Invocation; +import javax.ws.rs.client.WebTarget; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; +import org.mockito.Mock; +import org.onap.vid.aai.util.HttpClientMode; +import org.onap.vid.aai.util.HttpsAuthClient; +import org.onap.vid.aai.util.ServletRequestHelper; +import org.onap.vid.aai.util.SystemPropertyHelper; +import org.onap.vid.utils.Logging; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + public class PombaRestInterfaceTest { private static final String UUID_REGEX = "[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}"; private static final String SAMPLE_APP_ID = "vid"; @@ -81,6 +79,9 @@ public class PombaRestInterfaceTest { @Mock private Response response; + @Mock + private Logging loggingService; + private PombaRestInterface pombaRestInterface; @BeforeMethod @@ -90,7 +91,7 @@ public class PombaRestInterfaceTest { when(requestHelper.extractOrGenerateRequestId()).thenReturn(UUID.randomUUID().toString()); when(authClient.getClient(HttpClientMode.WITH_KEYSTORE)).thenReturn(client); setUpBuilder(); - pombaRestInterface = new PombaRestInterface(authClient, requestHelper, systemPropertyHelper); + pombaRestInterface = new PombaRestInterface(authClient, requestHelper, systemPropertyHelper, loggingService); } @@ -124,4 +125,4 @@ public class PombaRestInterfaceTest { when(builder.post(any(Entity.class))).thenReturn(response); when(response.getStatusInfo()).thenReturn(Response.Status.OK); } -}
\ No newline at end of file +} |