diff options
Diffstat (limited to 'vid-app-common/src/test/java/org/onap/vid/client/SyncRestClientForHttpServerTest.java')
-rw-r--r-- | vid-app-common/src/test/java/org/onap/vid/client/SyncRestClientForHttpServerTest.java | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/vid-app-common/src/test/java/org/onap/vid/client/SyncRestClientForHttpServerTest.java b/vid-app-common/src/test/java/org/onap/vid/client/SyncRestClientForHttpServerTest.java index 18b4089b5..b30cf5f32 100644 --- a/vid-app-common/src/test/java/org/onap/vid/client/SyncRestClientForHttpServerTest.java +++ b/vid-app-common/src/test/java/org/onap/vid/client/SyncRestClientForHttpServerTest.java @@ -20,31 +20,32 @@ package org.onap.vid.client; +import static com.xebialabs.restito.builder.stub.StubHttp.whenHttp; +import static com.xebialabs.restito.builder.verify.VerifyHttp.verifyHttp; +import static com.xebialabs.restito.semantics.Action.contentType; +import static com.xebialabs.restito.semantics.Action.ok; +import static com.xebialabs.restito.semantics.Action.status; +import static com.xebialabs.restito.semantics.Action.stringContent; +import static org.mockito.Mockito.mock; +import static org.testng.Assert.assertEquals; + import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.ImmutableMap; +import com.xebialabs.restito.semantics.Action; import com.xebialabs.restito.semantics.Condition; import com.xebialabs.restito.server.StubServer; import io.joshworks.restclient.http.HttpResponse; import io.joshworks.restclient.http.JsonNode; +import java.util.Collections; +import java.util.Map; +import org.glassfish.grizzly.http.Method; import org.glassfish.grizzly.http.util.HttpStatus; -import com.xebialabs.restito.semantics.Action; -import org.testng.annotations.BeforeMethod; +import org.onap.vid.utils.Logging; import org.testng.annotations.AfterMethod; -import org.glassfish.grizzly.http.Method; +import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; -import java.util.Collections; -import java.util.Map; - -import static com.xebialabs.restito.builder.verify.VerifyHttp.verifyHttp; -import static com.xebialabs.restito.builder.stub.StubHttp.whenHttp; -import static com.xebialabs.restito.semantics.Action.stringContent; -import static com.xebialabs.restito.semantics.Action.contentType; -import static com.xebialabs.restito.semantics.Action.status; -import static com.xebialabs.restito.semantics.Action.ok; -import static org.testng.Assert.assertEquals; - public class SyncRestClientForHttpServerTest { private static final SyncRestClientModel.TestModel testObject = new SyncRestClientModel.TestModel(1, "test"); @@ -53,12 +54,14 @@ public class SyncRestClientForHttpServerTest { private StubServer stubServer; private ObjectMapper objectMapper = new ObjectMapper(); private SyncRestClient syncRestClient; + private Logging mockLoggingService; @BeforeMethod public void setUp() { stubServer = new StubServer(); stubServer.run(); - syncRestClient = new SyncRestClient(); + mockLoggingService = mock(Logging.class); + syncRestClient = new SyncRestClient(mockLoggingService); } @AfterMethod |