sonar bug, Change the assertion arguments to not compare a primitive value with null
[so.git] / adapters / mso-sdnc-adapter / src / test / java / org / onap / so / adapters / sdnc / sdncrest / BPRestCallbackTest.java
index f868573..ab782d4 100644 (file)
@@ -25,7 +25,6 @@ import static com.github.tomakehurst.wiremock.client.WireMock.post;
 import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
-
 import org.apache.http.HttpStatus;
 import org.junit.Test;
 import org.onap.so.adapters.sdnc.BaseTest;
@@ -37,20 +36,18 @@ public class BPRestCallbackTest extends BaseTest {
     private BPRestCallback bpRestCallback;
 
     @Test
-    public void sendTest(){
-        String response = "<errors xmlns=\"urn:ietf:params:xml:ns:yang:ietf-restconf\">\n" +
-                "\t\t//   <error>\n" +
-                "\t\t//     <error-type>protocol</error-type>\n" +
-                "\t\t//     <error-tag>malformed-message</error-tag>\n" +
-                "\t\t//     <error-message>Error parsing input: The element type \"input\" must be terminated by the matching end-tag \"&lt;/input&gt;\".</error-message>\n" +
-                "\t\t//   </error>\n" +
-                "\t\t// </errors>";
+    public void sendTest() {
+        String response = "<errors xmlns=\"urn:ietf:params:xml:ns:yang:ietf-restconf\">\n" + "\t\t//   <error>\n"
+                + "\t\t//     <error-type>protocol</error-type>\n"
+                + "\t\t//     <error-tag>malformed-message</error-tag>\n"
+                + "\t\t//     <error-message>Error parsing input: The element type \"input\" must be terminated by the matching end-tag \"&lt;/input&gt;\".</error-message>\n"
+                + "\t\t//   </error>\n" + "\t\t// </errors>";
 
-        wireMockServer.stubFor(post(urlPathEqualTo("/sdnc"))
-                .willReturn(aResponse().withHeader("Content-Type", "application/xml").withBody(response).withStatus(HttpStatus.SC_MULTIPLE_CHOICES)));
+        wireMockServer.stubFor(
+                post(urlPathEqualTo("/sdnc")).willReturn(aResponse().withHeader("Content-Type", "application/xml")
+                        .withBody(response).withStatus(HttpStatus.SC_MULTIPLE_CHOICES)));
 
         boolean responseCommon = bpRestCallback.send("http://localhost:" + wireMockPort + "/sdnc", "Test");
-        assertNotNull(responseCommon);
-        assertEquals(true,responseCommon);
+        assertEquals(true, responseCommon);
     }
 }