aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientNewTest.java
diff options
context:
space:
mode:
authorEylon Malin <eylon.malin@intl.att.com>2019-09-12 14:25:32 +0300
committerEylon Malin <eylon.malin@intl.att.com>2019-09-12 14:25:32 +0300
commit2609cc76f0565466667fff8ae4d0707b94993877 (patch)
treee52f013baf27979dd8f0eb0d98bf6ff0c2cbb57f /vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientNewTest.java
parent079dfc9647074f7e40c8b5fe3eac5bd2b50ade0c (diff)
create JoshworksJacksonObjectMapper and use it everywhere needed
Create class that implement joshworks object mapper that used jackson object mapper that support kotlin. Use it instead local anonymous classes where needed Issue-ID: VID-611 Signed-off-by: Eylon Malin <eylon.malin@intl.att.com> Change-Id: Ie00dce0ec9b366515c5e40d9f37b9e64a2ceb357
Diffstat (limited to 'vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientNewTest.java')
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientNewTest.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientNewTest.java b/vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientNewTest.java
index f89eae25e..457007500 100644
--- a/vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientNewTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientNewTest.java
@@ -29,8 +29,8 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.onap.vid.controller.MsoController.SVC_INSTANCE_ID;
import static org.onap.vid.controller.MsoController.VNF_INSTANCE_ID;
+import static org.onap.vid.utils.KotlinUtilsKt.JOSHWORKS_JACKSON_OBJECT_MAPPER;
-import com.fasterxml.jackson.databind.ObjectMapper;
import com.xebialabs.restito.server.StubServer;
import io.joshworks.restclient.http.HttpResponse;
import java.io.IOException;
@@ -48,7 +48,6 @@ import org.junit.Test;
import org.onap.portalsdk.core.util.SystemProperties;
import org.onap.vid.client.SyncRestClient;
import org.onap.vid.controller.MsoController;
-import org.onap.vid.controller.WebConfig;
import org.onap.vid.mso.MsoProperties;
import org.onap.vid.mso.MsoResponseWrapper;
import org.onap.vid.mso.MsoResponseWrapperInterface;
@@ -474,8 +473,7 @@ public class MsoRestClientNewTest {
}
private MsoRestClientNew msoRestClient() {
- final WebConfig webConfig = new WebConfig();
- return new MsoRestClientNew(new SyncRestClient(webConfig.unirestFasterxmlObjectMapper(new ObjectMapper()), mock(Logging.class)),
+ return new MsoRestClientNew(new SyncRestClient(JOSHWORKS_JACKSON_OBJECT_MAPPER, mock(Logging.class)),
baseUrl(), null, new SystemPropertiesWrapper(), mock(Logging.class));
}