diff --git a/pom.xml b/pom.xml
index d81808f..51ec777 100644
--- a/pom.xml
+++ b/pom.xml
@@ -39,7 +39,7 @@
     <vavr.version>0.10.0</vavr.version>
     <jetbrains-annotations.version>16.0.3</jetbrains-annotations.version>
     <protoc-jar-maven-plugin.version>3.6.0.2</protoc-jar-maven-plugin.version>
-    <maven-failsafe-plugin.version>2.22.1</maven-failsafe-plugin.version>
+    <maven-failsafe-plugin.version>2.21.0</maven-failsafe-plugin.version>
   </properties>
 
   <modules>
diff --git a/rest-services/common-dependency/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/adapters/http/CloudHttpClientIT.java b/rest-services/common-dependency/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/adapters/http/CloudHttpClientIT.java
index 37c189e..936ef0c 100644
--- a/rest-services/common-dependency/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/adapters/http/CloudHttpClientIT.java
+++ b/rest-services/common-dependency/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/adapters/http/CloudHttpClientIT.java
@@ -20,6 +20,7 @@
 
 package org.onap.dcaegen2.services.sdk.rest.services.adapters.http;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
@@ -27,7 +28,6 @@
 import java.util.HashMap;
 import java.util.Map;
 import java.util.UUID;
-import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 import org.onap.dcaegen2.services.sdk.rest.services.model.DmaapModel;
 import org.onap.dcaegen2.services.sdk.rest.services.model.JsonBodyBuilder;
@@ -53,7 +53,6 @@
     private DmaapModel dmaapModel = mock(DmaapModel.class);
     private JsonBodyBuilder<DmaapModel> jsonBodyBuilder = mock(JsonBodyBuilder.class);
 
-    @Disabled
     @Test
     void successfulPatchResponse() {
         DisposableServer server = createValidServer();
@@ -63,15 +62,12 @@
         when(jsonBodyBuilder.createJsonBody(dmaapModel)).thenReturn(JSON_BODY);
         Mono<HttpClientResponse> content = cloudHttpClient.patch(SAMPLE_URL, createRequestDiagnosticContext(), createCustomHeaders(),
             jsonBodyBuilder, dmaapModel);
+        HttpClientResponse httpClientResponse = content.block();
 
-        StepVerifier.create(content)
-            .expectNext(content.block())
-            .expectComplete()
-            .verify();
+        assertEquals(HttpResponseStatus.OK, httpClientResponse.status());
         server.disposeNow();
     }
 
-    @Disabled
     @Test
     void errorPatchRequest() {
         DisposableServer server = createInvalidServer();
@@ -81,11 +77,39 @@
         when(jsonBodyBuilder.createJsonBody(dmaapModel)).thenReturn(JSON_BODY);
         Mono<HttpClientResponse> content = cloudHttpClient.patch(SAMPLE_URL, createRequestDiagnosticContext(), createCustomHeaders(),
             jsonBodyBuilder, dmaapModel);
+        HttpClientResponse httpClientResponse = content.block();
 
-        StepVerifier.create(content)
-            .expectNext(content.block())
-            .expectComplete()
-            .verify();
+        assertEquals(HttpResponseStatus.INTERNAL_SERVER_ERROR, httpClientResponse.status());
+        server.disposeNow();
+    }
+
+    @Test
+    void successfulPostResponse() {
+        DisposableServer server = createValidServer();
+        HttpClient httpClient = createHttpClientForContextWithAddress(server, connectionProvider);
+        CloudHttpClient cloudHttpClient = new CloudHttpClient(httpClient);
+
+        when(jsonBodyBuilder.createJsonBody(dmaapModel)).thenReturn(JSON_BODY);
+        Mono<HttpClientResponse> content = cloudHttpClient.post(SAMPLE_URL, createRequestDiagnosticContext(), createCustomHeaders(),
+            jsonBodyBuilder, dmaapModel);
+        HttpClientResponse httpClientResponse = content.block();
+
+        assertEquals(HttpResponseStatus.OK, httpClientResponse.status());
+        server.disposeNow();
+    }
+
+    @Test
+    void errorPostRequest() {
+        DisposableServer server = createInvalidServer();
+        HttpClient httpClient = createHttpClientForContextWithAddress(server, connectionProvider);
+        CloudHttpClient cloudHttpClient = new CloudHttpClient(httpClient);
+
+        when(jsonBodyBuilder.createJsonBody(dmaapModel)).thenReturn(JSON_BODY);
+        Mono<HttpClientResponse> content = cloudHttpClient.post(SAMPLE_URL, createRequestDiagnosticContext(), createCustomHeaders(),
+            jsonBodyBuilder, dmaapModel);
+        HttpClientResponse httpClientResponse = content.block();
+
+        assertEquals(HttpResponseStatus.INTERNAL_SERVER_ERROR, httpClientResponse.status());
         server.disposeNow();
     }
 
@@ -95,14 +119,22 @@
         HttpClient httpClient = createHttpClientForContextWithAddress(server, connectionProvider);
         CloudHttpClient cloudHttpClient = new CloudHttpClient(httpClient);
 
+        when(jsonBodyBuilder.createJsonBody(dmaapModel)).thenReturn(JSON_BODY);
         Mono<String> content = cloudHttpClient.get(SAMPLE_URL, String.class);
+        Mono<String> contentWithHeaders = cloudHttpClient.get(SAMPLE_URL, createRequestDiagnosticContext(),
+            createCustomHeaders(), String.class);
 
         StepVerifier.create(content)
             .expectNext(SAMPLE_STRING)
             .expectComplete()
             .verify();
+        StepVerifier.create(contentWithHeaders)
+            .expectNext(SAMPLE_STRING)
+            .expectComplete()
+            .verify();
         server.disposeNow();
     }
+
     @Test
     void errorGetRequest() {
         DisposableServer server = createInvalidServer();
@@ -120,7 +152,6 @@
     private Map<String, String> createCustomHeaders() {
         Map<String, String> customHeaders = new HashMap<>();
         customHeaders.put("X_INVOCATION_ID", UUID.randomUUID().toString());
-
         return customHeaders;
     }
 
