aboutsummaryrefslogtreecommitdiffstats
path: root/prh-dmaap-client/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'prh-dmaap-client/src/test')
-rw-r--r--prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/service/consumer/ExtendedDmaapConsumerHttpClientImplTest.java6
-rw-r--r--prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/service/producer/ExtendedDmaapProducerHttpClientImplTest.java12
2 files changed, 9 insertions, 9 deletions
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<String> 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<String> actualResult = objectUnderTest.getHttpProducerResponse(requestDetailsMock);
- Assertions.assertEquals(Optional.empty(),actualResult);
+ when(closeableHttpClientMock.execute(any(HttpPost.class), any(ResponseHandler.class)))
+ .thenReturn(Optional.empty());
+ Optional<String> actualResult = objectUnderTest.getHttpProducerResponse(requestDetailsMock);
+ Assertions.assertEquals(Optional.empty(), actualResult);
}