X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=bpmn%2Fso-bpmn-infrastructure-common%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fso%2Fbpmn%2Finfrastructure%2Fpnf%2Fdelegate%2FInformKafkaClientTest.java;fp=bpmn%2Fso-bpmn-infrastructure-common%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fso%2Fbpmn%2Finfrastructure%2Fpnf%2Fdelegate%2FInformDmaapClientTest.java;h=d8a102f2b4cb867b78077e189f5305e911a84ba3;hb=0720a8a4e336d516ee00c515a392bb48a23404fd;hp=94aa1427a44d77f3b8caec3e4452e0d0d6212bc0;hpb=0420dbbef6cf04a662dadcd84c6a4682e3a412fc;p=so.git diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformKafkaClientTest.java similarity index 81% rename from bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java rename to bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformKafkaClientTest.java index 94aa1427a4..d8a102f2b4 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformKafkaClientTest.java @@ -35,40 +35,40 @@ import org.junit.Before; import org.junit.Test; import org.mockito.InOrder; -public class InformDmaapClientTest { +public class InformKafkaClientTest { @Before public void setUp() { - informDmaapClient = new InformDmaapClient(); - dmaapClientTest = new DmaapClientTestImpl(); - informDmaapClient.setDmaapClient(dmaapClientTest); + informKafkaClient = new InformKafkaClient(); + kafkaClientTest = new KafkaClientTestImpl(); + informKafkaClient.setKafkaClient(kafkaClientTest); delegateExecution = mockDelegateExecution(); } - private InformDmaapClient informDmaapClient; + private InformKafkaClient informKafkaClient; - private DmaapClientTestImpl dmaapClientTest; + private KafkaClientTestImpl kafkaClientTest; private DelegateExecution delegateExecution; private MessageCorrelationBuilder messageCorrelationBuilder; @Test - public void shouldSendListenerToDmaapClient() { + public void shouldSendListenerToKafkaClient() { // when - informDmaapClient.execute(delegateExecution); + informKafkaClient.execute(delegateExecution); // then - assertThat(dmaapClientTest.getPnfCorrelationId()).isEqualTo("testPnfCorrelationId"); - assertThat(dmaapClientTest.getInformConsumer()).isNotNull(); + assertThat(kafkaClientTest.getPnfCorrelationId()).isEqualTo("testPnfCorrelationId"); + assertThat(kafkaClientTest.getInformConsumer()).isNotNull(); verifyZeroInteractions(messageCorrelationBuilder); } @Test - public void shouldSendListenerToDmaapClientAndSendMessageToCamunda() { + public void shouldSendListenerToKafkaClientAndSendMessageToCamunda() { // when - informDmaapClient.execute(delegateExecution); - dmaapClientTest.getInformConsumer().run(); + informKafkaClient.execute(delegateExecution); + kafkaClientTest.getInformConsumer().run(); // then - assertThat(dmaapClientTest.getPnfCorrelationId()).isEqualTo("testPnfCorrelationId"); + assertThat(kafkaClientTest.getPnfCorrelationId()).isEqualTo("testPnfCorrelationId"); InOrder inOrder = inOrder(messageCorrelationBuilder); inOrder.verify(messageCorrelationBuilder).processInstanceBusinessKey("testBusinessKey"); inOrder.verify(messageCorrelationBuilder).correlateWithResult();