X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=holmes-actions%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fholmes%2Fcommon%2Fdmaap%2FPublisherTest.java;h=95bde259fe5b977565b943bd6b4ac9a337659f98;hb=96a6ea5cab6575b7e04d6736cee6906298065a7b;hp=164c1762d5881a783650ae7d8bddbad0fcf59576;hpb=814861d9a0b4d093c482e3338453771423dcd7f0;p=holmes%2Fcommon.git diff --git a/holmes-actions/src/test/java/org/onap/holmes/common/dmaap/PublisherTest.java b/holmes-actions/src/test/java/org/onap/holmes/common/dmaap/PublisherTest.java index 164c176..95bde25 100644 --- a/holmes-actions/src/test/java/org/onap/holmes/common/dmaap/PublisherTest.java +++ b/holmes-actions/src/test/java/org/onap/holmes/common/dmaap/PublisherTest.java @@ -30,6 +30,7 @@ import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; import org.apache.http.StatusLine; import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; import org.easymock.EasyMock; import org.junit.Rule; import org.junit.Test; @@ -73,8 +74,10 @@ public class PublisherTest { PowerMockito.mockStatic(HttpsUtils.class); HttpResponse httpResponse = PowerMockito.mock(HttpResponse.class); - PowerMockito.when(HttpsUtils.post(Matchers.eq("http://localhost/dmaapTopic"), - Matchers.any(HashMap.class), Matchers.any(HashMap.class), Matchers.any(StringEntity.class))).thenReturn(httpResponse); + PowerMockito.when(HttpsUtils + .post(Matchers.eq("http://localhost/dmaapTopic"), Matchers.any(HashMap.class), + Matchers.any(HashMap.class), Matchers.any(StringEntity.class), + Matchers.any(CloseableHttpClient.class))).thenReturn(httpResponse); StatusLine statusLine = PowerMockito.mock(StatusLine.class); PowerMockito.when(httpResponse.getStatusLine()).thenReturn(statusLine); PowerMockito.when(statusLine.getStatusCode()).thenReturn(HttpStatus.SC_OK);