import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.onap.dmaap.mr.client.MRBatchingPublisher;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.onap.dmaap.mr.client.MRBatchingPublisher;
import org.oransc.policyagent.clients.AsyncRestClient;
import org.oransc.policyagent.configuration.ApplicationConfig;
import org.oransc.policyagent.dmaap.DmaapRequestMessage.Operation;
import org.oransc.policyagent.clients.AsyncRestClient;
import org.oransc.policyagent.configuration.ApplicationConfig;
import org.oransc.policyagent.dmaap.DmaapRequestMessage.Operation;
public void successfulCase() throws IOException {
doReturn(Mono.just("OK")).when(agentClient).delete("url");
doReturn(1).when(dmaapClient).send(anyString());
public void successfulCase() throws IOException {
doReturn(Mono.just("OK")).when(agentClient).delete("url");
doReturn(1).when(dmaapClient).send(anyString());
verifyNoMoreInteractions(agentClient);
verify(dmaapClient, times(1)).send(anyString());
verifyNoMoreInteractions(agentClient);
verify(dmaapClient, times(1)).send(anyString());
public void errorCase() throws IOException {
doReturn(Mono.error(new Exception("Refused"))).when(agentClient).put("url", "payload");
doReturn(1).when(dmaapClient).send(anyString());
public void errorCase() throws IOException {
doReturn(Mono.error(new Exception("Refused"))).when(agentClient).put("url", "payload");
doReturn(1).when(dmaapClient).send(anyString());