X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=policy-agent%2Fsrc%2Ftest%2Fjava%2Forg%2Foransc%2Fpolicyagent%2Fdmaap%2FDmaapMessageHandlerTest.java;h=71c850033ba6b04056aaed407e9e38e350df1513;hb=86108abda4eafd500f50644f1bbb34e9673f8497;hp=66e83f870b9b7a66d2f9ea4c2ca58c637aae0ee9;hpb=0b2f51f6215dad3fc93d74572ad23f950ad8ae98;p=nonrtric.git diff --git a/policy-agent/src/test/java/org/oransc/policyagent/dmaap/DmaapMessageHandlerTest.java b/policy-agent/src/test/java/org/oransc/policyagent/dmaap/DmaapMessageHandlerTest.java index 66e83f87..71c85003 100644 --- a/policy-agent/src/test/java/org/oransc/policyagent/dmaap/DmaapMessageHandlerTest.java +++ b/policy-agent/src/test/java/org/oransc/policyagent/dmaap/DmaapMessageHandlerTest.java @@ -36,6 +36,7 @@ import java.io.IOException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.onap.dmaap.mr.client.MRBatchingPublisher; +import org.onap.dmaap.mr.client.response.MRPublisherResponse; import org.oransc.policyagent.clients.AsyncRestClient; import org.oransc.policyagent.configuration.ApplicationConfig; import org.oransc.policyagent.dmaap.DmaapRequestMessage.Operation; @@ -80,6 +81,7 @@ public class DmaapMessageHandlerTest { public void successfulCase() throws IOException { doReturn(Mono.just("OK")).when(agentClient).delete("url"); doReturn(1).when(dmaapClient).send(anyString()); + doReturn(new MRPublisherResponse()).when(dmaapClient).sendBatchWithResponse(); StepVerifier // .create(testedObject.createTask(dmaapInputMessage(Operation.DELETE))) // @@ -91,6 +93,7 @@ public class DmaapMessageHandlerTest { verifyNoMoreInteractions(agentClient); verify(dmaapClient, times(1)).send(anyString()); + verify(dmaapClient, times(1)).sendBatchWithResponse(); verifyNoMoreInteractions(dmaapClient); } @@ -98,7 +101,7 @@ public class DmaapMessageHandlerTest { public void errorCase() throws IOException { doReturn(Mono.error(new Exception("Refused"))).when(agentClient).put("url", "payload"); doReturn(1).when(dmaapClient).send(anyString()); - + doReturn(new MRPublisherResponse()).when(dmaapClient).sendBatchWithResponse(); StepVerifier // .create(testedObject.createTask(dmaapInputMessage(Operation.PUT))) // .expectSubscription() // @@ -109,6 +112,7 @@ public class DmaapMessageHandlerTest { // Error response verify(dmaapClient, times(1)).send(anyString()); + verify(dmaapClient, times(1)).sendBatchWithResponse(); verifyNoMoreInteractions(dmaapClient); }