From 258be88cb2a098dc526ec294b44b2859a6a845b7 Mon Sep 17 00:00:00 2001
From: arun chapagain <arun.chapagain@huawei.com>
Date: Thu, 6 Aug 2020 15:44:12 +0530
Subject: changes for java 11 upgradation Issue-ID: SO-3082

Signed-off-by: arun chapagain <arun.chapagain@huawei.com>
Change-Id: Icb14f1a29d06d828307f0acc23d4414fecbbfaa3
---
 common/src/test/java/org/onap/so/client/HttpClientTest.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'common/src/test/java/org')

diff --git a/common/src/test/java/org/onap/so/client/HttpClientTest.java b/common/src/test/java/org/onap/so/client/HttpClientTest.java
index a01e2bb812..e9e8fe7853 100644
--- a/common/src/test/java/org/onap/so/client/HttpClientTest.java
+++ b/common/src/test/java/org/onap/so/client/HttpClientTest.java
@@ -40,7 +40,7 @@ public class HttpClientTest {
 
     private final HttpClientFactory httpClientFactory = new HttpClientFactory();
     @Rule
-    public WireMockRule wireMockRule = new WireMockRule(wireMockConfig().dynamicHttpsPort());
+    public WireMockRule wireMockRule = new WireMockRule(wireMockConfig().dynamicPort().dynamicHttpsPort());
 
     @Test
     public void testPost_success() throws MalformedURLException {
@@ -48,7 +48,7 @@ public class HttpClientTest {
         wireMockRule.stubFor(post(urlEqualTo("/services/sdnc/post"))
                 .willReturn(aResponse().withStatus(200).withHeader("Content-Type", "application/json").withBody("")));
 
-        URL url = new URL("http://localhost:" + wireMockConfig().portNumber() + "/services/sdnc/post");
+        URL url = new URL("http://localhost:" + wireMockRule.port() + "/services/sdnc/post");
         HttpClient client = httpClientFactory.newJsonClient(url, ONAPComponents.BPMN);
 
         client.addBasicAuthHeader(
@@ -67,7 +67,7 @@ public class HttpClientTest {
         wireMockRule.stubFor(post(urlEqualTo("/services/sdnc/post"))
                 .willReturn(aResponse().withStatus(200).withHeader("Content-Type", "application/json").withBody("")));
 
-        URL url = new URL("http://localhost:" + wireMockConfig().portNumber() + "/services/sdnc/post");
+        URL url = new URL("http://localhost:" + wireMockRule.port() + "/services/sdnc/post");
         HttpClient client = httpClientFactory.newJsonClient(url, ONAPComponents.BPMN);
 
         client.addAdditionalHeader("Accept", "application/json");
@@ -85,7 +85,7 @@ public class HttpClientTest {
         wireMockRule.stubFor(post(urlEqualTo("/services/sdnc/post"))
                 .willReturn(aResponse().withStatus(200).withHeader("Content-Type", "application/json").withBody("")));
 
-        URL url = new URL("http://localhost:" + wireMockConfig().portNumber() + "/services/sdnc/post");
+        URL url = new URL("http://localhost:" + wireMockRule.port() + "/services/sdnc/post");
         HttpClient client = httpClientFactory.newJsonClient(url, ONAPComponents.BPMN);
 
         client.addBasicAuthHeader("", "12345");
-- 
cgit 1.2.3-korg