diff options
Diffstat (limited to 'prh-dmaap-client/src/test')
2 files changed, 3 insertions, 2 deletions
diff --git a/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/consumer/DMaaPConsumerReactiveHttpClientTest.java b/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/consumer/DMaaPConsumerReactiveHttpClientTest.java index b0d503af..1a237562 100644 --- a/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/consumer/DMaaPConsumerReactiveHttpClientTest.java +++ b/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/consumer/DMaaPConsumerReactiveHttpClientTest.java @@ -45,10 +45,9 @@ import reactor.test.StepVerifier; */ class DMaaPConsumerReactiveHttpClientTest { + private static final String JSON_MESSAGE = "{ \"responseFromDmaap\": \"Success\"}"; private DMaaPConsumerReactiveHttpClient dmaapConsumerReactiveHttpClient; - private DmaapConsumerConfiguration consumerConfigurationMock = mock(DmaapConsumerConfiguration.class); - private static final String JSON_MESSAGE = "{ \"responseFromDmaap\": \"Success\"}"; private Mono<String> expectedResult = Mono.empty(); private WebClient webClient; private RequestHeadersUriSpec requestHeadersSpec; @@ -114,6 +113,7 @@ class DMaaPConsumerReactiveHttpClientTest { private void mockDependantObjects() { when(webClient.get()).thenReturn(requestHeadersSpec); when(requestHeadersSpec.uri((URI) any())).thenReturn(requestHeadersSpec); + when(requestHeadersSpec.header(any(), any())).thenReturn(requestHeadersSpec); when(requestHeadersSpec.retrieve()).thenReturn(responseSpec); doReturn(responseSpec).when(responseSpec).onStatus(any(), any()); } diff --git a/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/producer/DMaaPProducerReactiveHttpClientTest.java b/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/producer/DMaaPProducerReactiveHttpClientTest.java index 538385ce..e8af8cd9 100644 --- a/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/producer/DMaaPProducerReactiveHttpClientTest.java +++ b/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/producer/DMaaPProducerReactiveHttpClientTest.java @@ -113,6 +113,7 @@ class DMaaPProducerReactiveHttpClientTest { RequestHeadersSpec requestHeadersSpec = mock(RequestHeadersSpec.class); when(webClient.post()).thenReturn(requestBodyUriSpec); when(requestBodyUriSpec.uri((URI) any())).thenReturn(requestBodyUriSpec); + when(requestBodyUriSpec.header(any(), any())).thenReturn(requestBodyUriSpec); when(requestBodyUriSpec.body(any())).thenReturn(requestHeadersSpec); doReturn(responseSpec).when(requestHeadersSpec).retrieve(); doReturn(responseSpec).when(responseSpec).onStatus(any(), any()); |