From 44ce56cf2e6bfae17c443901ac6ded8ba8cdd414 Mon Sep 17 00:00:00 2001 From: wasala Date: Tue, 8 May 2018 13:48:44 +0200 Subject: Added dmaap consumer task execution to workflow Change-Id: I67904a8ffb7d401fa2188fb046e28474eded4377 Issue-ID: DCAEGEN2-474 Signed-off-by: wasala --- .../consumer/ExtendedDmaapConsumerHttpClientImplTest.java | 6 +++--- .../producer/ExtendedDmaapProducerHttpClientImplTest.java | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'prh-dmaap-client/src/test') diff --git a/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/service/consumer/ExtendedDmaapConsumerHttpClientImplTest.java b/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/service/consumer/ExtendedDmaapConsumerHttpClientImplTest.java index 21d3e4c2..1df025ca 100644 --- a/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/service/consumer/ExtendedDmaapConsumerHttpClientImplTest.java +++ b/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/service/consumer/ExtendedDmaapConsumerHttpClientImplTest.java @@ -57,9 +57,9 @@ public class ExtendedDmaapConsumerHttpClientImplTest { when(configurationMock.dmaapUserName()).thenReturn("PRH"); when(configurationMock.dmaapUserPassword()).thenReturn("PRH"); when(configurationMock.dmaapContentType()).thenReturn("application/json"); - when(configurationMock.dmaapTopicName()).thenReturn("pnfReady"); - when(configurationMock.consumerGroup()).thenReturn("consumerGroup"); - when(configurationMock.consumerId()).thenReturn("consumerId"); + when(configurationMock.dmaapTopicName()).thenReturn("unauthenticated.SEC_OTHER_OUTPUT"); + when(configurationMock.consumerGroup()).thenReturn("OpenDCAE-c12"); + when(configurationMock.consumerId()).thenReturn("c12"); objectUnderTest = new ExtendedDmaapConsumerHttpClientImpl(configurationMock); diff --git a/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/service/producer/ExtendedDmaapProducerHttpClientImplTest.java b/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/service/producer/ExtendedDmaapProducerHttpClientImplTest.java index 0560432b..3f64fd5f 100644 --- a/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/service/producer/ExtendedDmaapProducerHttpClientImplTest.java +++ b/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/service/producer/ExtendedDmaapProducerHttpClientImplTest.java @@ -62,7 +62,7 @@ public class ExtendedDmaapProducerHttpClientImplTest { when(configurationMock.dmaapTopicName()).thenReturn("pnfReady"); when(requestDetailsMock.dmaapAPIPath()).thenReturn("events"); - when(requestDetailsMock.jsonBody()).thenReturn(Optional.of(JSON_MESSAGE)); + when(requestDetailsMock.jsonBody()).thenReturn(JSON_MESSAGE); objectUnderTest = new ExtendedDmaapProducerHttpClientImpl(configurationMock); @@ -75,7 +75,7 @@ public class ExtendedDmaapProducerHttpClientImplTest { expectedResult = Optional.of(RESPONSE_SUCCESS); when(closeableHttpClientMock.execute(any(HttpPost.class), any(ResponseHandler.class))) - .thenReturn(expectedResult); + .thenReturn(expectedResult); Optional actualResult = objectUnderTest.getHttpProducerResponse(requestDetailsMock); @@ -85,10 +85,10 @@ public class ExtendedDmaapProducerHttpClientImplTest { @Test public void getExtendedDetails_returnsFailure() throws IOException { expectedResult = Optional.of(RESPONSE_FAILURE); - when(closeableHttpClientMock.execute(any(HttpPost.class), any(ResponseHandler.class))). - thenReturn(Optional.empty()); - Optional actualResult = objectUnderTest.getHttpProducerResponse(requestDetailsMock); - Assertions.assertEquals(Optional.empty(),actualResult); + when(closeableHttpClientMock.execute(any(HttpPost.class), any(ResponseHandler.class))) + .thenReturn(Optional.empty()); + Optional actualResult = objectUnderTest.getHttpProducerResponse(requestDetailsMock); + Assertions.assertEquals(Optional.empty(), actualResult); } -- cgit 1.2.3-korg