aboutsummaryrefslogtreecommitdiffstats
path: root/rest-services/dmaap-client/src/test/java
diff options
context:
space:
mode:
authorPiotr Wielebski <piotr.wielebski@nokia.com>2019-03-27 10:59:06 +0000
committerGerrit Code Review <gerrit@onap.org>2019-03-27 10:59:06 +0000
commit999a1d92f3f30156501186bc4b9407bb6913db67 (patch)
tree2b4d1f114a839c77ab03e97ab3f404e62b20c302 /rest-services/dmaap-client/src/test/java
parent918d24a717d057054ec3a9fe4962e51a54723ce4 (diff)
parent4dcef4e7da04caf4b98ce9553c600e3821b91922 (diff)
Merge "DMaaP consumer more generic Added logging to Cloud Http Client"
Diffstat (limited to 'rest-services/dmaap-client/src/test/java')
-rw-r--r--rest-services/dmaap-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/service/consumer/DMaaPConsumerReactiveHttpClientTest.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/rest-services/dmaap-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/service/consumer/DMaaPConsumerReactiveHttpClientTest.java b/rest-services/dmaap-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/service/consumer/DMaaPConsumerReactiveHttpClientTest.java
index c37514eb..5a29fff0 100644
--- a/rest-services/dmaap-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/service/consumer/DMaaPConsumerReactiveHttpClientTest.java
+++ b/rest-services/dmaap-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/service/consumer/DMaaPConsumerReactiveHttpClientTest.java
@@ -23,7 +23,7 @@ package org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.service.consum
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
import java.net.URI;
import java.util.Optional;
import org.apache.http.entity.ContentType;
@@ -45,7 +45,7 @@ class DMaaPConsumerReactiveHttpClientTest {
private static final String JSON_MESSAGE = "{ \"responseFromDmaap\": \"Success\"}";
private DMaaPConsumerReactiveHttpClient dmaapConsumerReactiveHttpClient;
private DmaapConsumerConfiguration consumerConfigurationMock = mock(DmaapConsumerConfiguration.class);
- private Mono<JsonArray> expectedResult;
+ private Mono<JsonElement> expectedResult;
private CloudHttpClient httpClient = mock(CloudHttpClient.class);
private URI exampleTestUri = URI
.create("https://54.45.33.2:1234/unauthenticated.SEC_OTHER_OUTPUT/OpenDCAE-c12/c12");
@@ -68,11 +68,12 @@ class DMaaPConsumerReactiveHttpClientTest {
@Test
void getHttpResponse_Success() {
//given
- expectedResult = Mono.just(mock(JsonArray.class));
- when(httpClient.get(exampleTestUri.toString(), requestDiagnosticContext, DMaaPClientServiceUtils.getHeaders(ContentType.APPLICATION_JSON.getMimeType()), JsonArray.class))
+ expectedResult = Mono.just(mock(JsonElement.class));
+ when(httpClient.get(exampleTestUri.toString(), requestDiagnosticContext,
+ DMaaPClientServiceUtils.getHeaders(ContentType.APPLICATION_JSON.getMimeType()), JsonElement.class))
.thenReturn(expectedResult);
//when
- Mono<JsonArray> response = dmaapConsumerReactiveHttpClient
+ Mono<JsonElement> response = dmaapConsumerReactiveHttpClient
.getDMaaPConsumerResponse(Optional.of(requestDiagnosticContext));
//then
StepVerifier.create(response).expectSubscription()