replace all fixed wiremock ports
[so.git] / adapters / mso-sdnc-adapter / src / test / java / org / onap / so / adapters / sdnc / sdncrest / SDNCConnectorTest.java
index 23830ae..1de281b 100644 (file)
 
 package org.onap.so.adapters.sdnc.sdncrest;
 
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.post;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
+import static org.junit.Assert.assertNotNull;
+
 import org.apache.http.HttpStatus;
 import org.junit.Test;
 import org.onap.so.adapters.sdnc.BaseTest;
 import org.onap.so.adapters.sdncrest.SDNCResponseCommon;
 import org.springframework.beans.factory.annotation.Autowired;
 
-import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
-import static com.github.tomakehurst.wiremock.client.WireMock.post;
-import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
-import static org.junit.Assert.assertNotNull;
-import static com.github.tomakehurst.wiremock.client.WireMock.*;
-
 public class SDNCConnectorTest extends BaseTest {
 
     @Autowired
@@ -54,7 +53,7 @@ public class SDNCConnectorTest extends BaseTest {
         rt.setReqMethod("POST");
         rt.setSdncUrl("http://localhost:" + wireMockPort + "/sdnc");
 
-        stubFor(post(urlPathEqualTo("/sdnc"))
+        wireMockServer.stubFor(post(urlPathEqualTo("/sdnc"))
                 .willReturn(aResponse().withHeader("Content-Type", "application/xml").withBody(response).withStatus(HttpStatus.SC_MULTIPLE_CHOICES)));
 
         SDNCResponseCommon responseCommon = sdncConnector.send(content, rt);