diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AAIConsumerTask.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AAIConsumerTask.java
index b4b6603..ffc8132 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AAIConsumerTask.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AAIConsumerTask.java
@@ -22,7 +22,7 @@
 
 import org.onap.dcaegen2.services.prh.exceptions.AAINotFoundException;
 
-public abstract class AAIConsumerTask<T, U, V> extends Task {
+public abstract class AAIConsumerTask<T, U, V, Z> extends Task<Z> {
 
     protected abstract V consume(U message) throws AAINotFoundException;
 
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AAIConsumerTaskImpl.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AAIConsumerTaskImpl.java
index 31af9c8..3c2b297 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AAIConsumerTaskImpl.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AAIConsumerTaskImpl.java
@@ -33,7 +33,8 @@
 import org.springframework.stereotype.Component;
 
 @Component
-public class AAIConsumerTaskImpl extends AAIConsumerTask<AAIConsumerClient, ConsumerDmaapModel, Object> {
+public class AAIConsumerTaskImpl extends
+    AAIConsumerTask<AAIConsumerClient, ConsumerDmaapModel, Object, AAIClientConfiguration> {
 
     private static final Logger logger = LoggerFactory.getLogger(AAIConsumerTaskImpl.class);
 
@@ -66,16 +67,11 @@
         throw new AAINotFoundException("Incorrect object type");
     }
 
-    @Override
-    void initConfigs() {
-        logger.trace("initConfigs for AAIConsumerTaskImpl not needed/supported");
-    }
-
-
     protected void setAAIClientConfig() {
         aaiConsumerClient = resolveClient();
     }
 
+    @Override
     AAIClientConfiguration resolveConfiguration() {
         return prhAppConfig.getAAIClientConfiguration();
     }
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AAIProducerTaskImpl.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AAIProducerTaskImpl.java
index 5d022f8..79d9b88 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AAIProducerTaskImpl.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AAIProducerTaskImpl.java
@@ -74,11 +74,6 @@
         throw new AAINotFoundException("Incorrect object type");
     }
 
-    @Override
-    void initConfigs() {
-        logger.trace("initConfigs for AAIProducerTaskImpl not needed/supported");
-    }
-
     void setAAIClientConfig() {
         aaiProducerClient = resolveClient();
     }
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTask.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTask.java
index 3e82707..195eee7 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTask.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTask.java
@@ -24,9 +24,11 @@
 /**
  * @author <a href="mailto:przemyslaw.wasala@nokia.com">Przemysław Wąsala</a> on 4/13/18
  */
-public abstract class DmaapConsumerTask<T, U, V> extends Task {
+public abstract class DmaapConsumerTask<T, U, V, Z> extends Task<Z> {
 
     protected abstract V consume(U message) throws DmaapNotFoundException;
 
-    protected abstract T resolveConfiguration();
+    protected abstract T resolveClient();
+
+    abstract void initConfigs();
 }
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTaskImpl.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTaskImpl.java
index 3b5a164..d5cf91d 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTaskImpl.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTaskImpl.java
@@ -37,12 +37,14 @@
  * @author <a href="mailto:przemyslaw.wasala@nokia.com">Przemysław Wąsala</a> on 3/23/18
  */
 @Component
-public class DmaapConsumerTaskImpl extends DmaapConsumerTask<DmaapConsumerConfiguration, String, ConsumerDmaapModel> {
+public class DmaapConsumerTaskImpl extends
+    DmaapConsumerTask<ExtendedDmaapConsumerHttpClientImpl, String, ConsumerDmaapModel, DmaapConsumerConfiguration> {
 
 
     private static final Logger logger = LoggerFactory.getLogger(DmaapConsumerTaskImpl.class);
 
     private final Config prhAppConfig;
+    private ExtendedDmaapConsumerHttpClientImpl extendedDmaapConsumerHttpClient;
 
     @Autowired
     public DmaapConsumerTaskImpl(AppConfig prhAppConfig) {
@@ -57,20 +59,30 @@
 
     @Override
     public Object execute(Object object) throws PrhTaskException {
+        setDmaapClientConfig();
         logger.trace("Method called with arg {}", object);
-        ExtendedDmaapConsumerHttpClientImpl dmaapConsumerHttpClient = new ExtendedDmaapConsumerHttpClientImpl(
-            resolveConfiguration());
-        return consume((dmaapConsumerHttpClient.getHttpConsumerResponse().orElseThrow(() ->
+        return consume((extendedDmaapConsumerHttpClient.getHttpConsumerResponse().orElseThrow(() ->
             new PrhTaskException("DmaapConsumerTask has returned null"))));
     }
 
     @Override
-    protected DmaapConsumerConfiguration resolveConfiguration() {
+    void initConfigs() {
+        prhAppConfig.initFileStreamReader();
+    }
+
+    protected void setDmaapClientConfig() {
+        extendedDmaapConsumerHttpClient = resolveClient();
+    }
+
+    @Override
+    DmaapConsumerConfiguration resolveConfiguration() {
         return prhAppConfig.getDmaapConsumerConfiguration();
     }
 
     @Override
-    protected void initConfigs() {
-        prhAppConfig.initFileStreamReader();
+    protected ExtendedDmaapConsumerHttpClientImpl resolveClient() {
+        return new ExtendedDmaapConsumerHttpClientImpl(resolveConfiguration());
     }
+
+
 }
\ No newline at end of file
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTask.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTask.java
index 2329274..8985133 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTask.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTask.java
@@ -24,9 +24,9 @@
 /**
  * @author <a href="mailto:przemyslaw.wasala@nokia.com">Przemysław Wąsala</a> on 3/23/18
  */
-public abstract class DmaapPublisherTask<T, U> extends Task {
+public abstract class DmaapPublisherTask<T, U, V> extends Task<V> {
 
     protected abstract String publish(U message) throws DmaapNotFoundException;
 
-    protected abstract T resolveConfiguration();
+    protected abstract T resolveClient();
 }
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTaskImpl.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTaskImpl.java
index 77373e4..d03f806 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTaskImpl.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTaskImpl.java
@@ -38,7 +38,7 @@
  */
 @Component
 public class DmaapPublisherTaskImpl extends
-        DmaapPublisherTask<DmaapPublisherConfiguration, ConsumerDmaapModel> {
+    DmaapPublisherTask<ExtendedDmaapProducerHttpClientImpl, ConsumerDmaapModel, DmaapPublisherConfiguration> {
 
     private static final Logger logger = LoggerFactory.getLogger(DmaapPublisherTaskImpl.class);
     private static final Gson gson = new Gson();
@@ -53,11 +53,11 @@
     protected String publish(ConsumerDmaapModel consumerDmaapModel) throws DmaapNotFoundException {
         logger.trace("Method called with arg {}", consumerDmaapModel);
         ExtendedDmaapProducerHttpClientImpl dmaapProducerHttpClient = new ExtendedDmaapProducerHttpClientImpl(
-                resolveConfiguration());
+            resolveConfiguration());
 
         return dmaapProducerHttpClient.getHttpProducerResponse(consumerDmaapModel)
-                .filter(x -> !x.isEmpty() && x.equals(String.valueOf(HttpStatus.OK.value())))
-                .orElseThrow(() -> new DmaapNotFoundException("Incorrect response from Dmaap"));
+            .filter(x -> !x.isEmpty() && x.equals(String.valueOf(HttpStatus.OK.value())))
+            .orElseThrow(() -> new DmaapNotFoundException("Incorrect response from Dmaap"));
     }
 
     @Override
@@ -70,12 +70,12 @@
     }
 
     @Override
-    void initConfigs() {
-        logger.trace("initConfigs for DmaapPublisherTaskImpl not needed/supported");
+    DmaapPublisherConfiguration resolveConfiguration() {
+        return prhAppConfig.getDmaapPublisherConfiguration();
     }
 
     @Override
-    protected DmaapPublisherConfiguration resolveConfiguration() {
-        return prhAppConfig.getDmaapPublisherConfiguration();
+    protected ExtendedDmaapProducerHttpClientImpl resolveClient() {
+        return null;
     }
 }
\ No newline at end of file
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/ScheduledTasks.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/ScheduledTasks.java
index 07c0a58..6b868d6 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/ScheduledTasks.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/ScheduledTasks.java
@@ -33,9 +33,9 @@
 
     private static final Logger logger = LoggerFactory.getLogger(ScheduledTasks.class);
 
-    private final Task dmaapConsumerTask;
-    private final Task dmaapProducerTask;
-    private final Task aaiProducerTask;
+    private final DmaapConsumerTask dmaapConsumerTask;
+    private final DmaapPublisherTask dmaapProducerTask;
+    private final AAIProducerTask aaiProducerTask;
 
     @Autowired
     public ScheduledTasks(DmaapConsumerTask dmaapConsumerTask, DmaapPublisherTask dmaapPublisherTask,
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/Task.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/Task.java
index 9720214..42f0405 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/Task.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/Task.java
@@ -26,7 +26,7 @@
  */
 
 
-public abstract class Task {
+public abstract class Task<T> {
 
     private Task taskProcess;
 
@@ -44,5 +44,5 @@
 
     abstract Object execute(Object object) throws PrhTaskException;
 
-    abstract void initConfigs();
+    abstract T resolveConfiguration();
 }
diff --git a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AAIConsumerTaskImplTest.java b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AAIConsumerTaskImplTest.java
index 548a285..112b696 100644
--- a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AAIConsumerTaskImplTest.java
+++ b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AAIConsumerTaskImplTest.java
@@ -110,7 +110,6 @@
         when(aaiConsumerTask.resolveConfiguration()).thenReturn(aaiClientConfiguration);
         doReturn(aaiConsumerClient).when(aaiConsumerTask).resolveClient();
         aaiConsumerTask.setAAIClientConfig();
-        aaiConsumerTask.initConfigs();
         response = aaiConsumerTask.execute(consumerDmaapModel);
 
         //then
@@ -133,7 +132,6 @@
         when(aaiConsumerTask.resolveConfiguration()).thenReturn(aaiClientConfiguration);
         doReturn(aaiConsumerClient).when(aaiConsumerTask).resolveClient();
         aaiConsumerTask.setAAIClientConfig();
-        aaiConsumerTask.initConfigs();
         try {
             response = aaiConsumerTask.execute(consumerDmaapModel);
         } catch (PrhTaskException e) {
@@ -158,7 +156,6 @@
         when(aaiConsumerTask.resolveConfiguration()).thenReturn(aaiClientConfiguration);
         doReturn(aaiConsumerClient).when(aaiConsumerTask).resolveClient();
         aaiConsumerTask.setAAIClientConfig();
-        aaiConsumerTask.initConfigs();
         try {
             response = aaiConsumerTask.execute(consumerDmaapModel);
         } catch (AAINotFoundException e) {
diff --git a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AAIProducerTaskImplTest.java b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AAIProducerTaskImplTest.java
index 203f349..40fd20a 100644
--- a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AAIProducerTaskImplTest.java
+++ b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AAIProducerTaskImplTest.java
@@ -112,7 +112,6 @@
         when(aaiProducerTask.resolveConfiguration()).thenReturn(aaiClientConfiguration);
         doReturn(aaiProducerClient).when(aaiProducerTask).resolveClient();
         aaiProducerTask.setAAIClientConfig();
-        aaiProducerTask.initConfigs();
         response = aaiProducerTask.execute(consumerDmaapModel);
 
         //then
@@ -135,7 +134,6 @@
         when(aaiProducerTask.resolveConfiguration()).thenReturn(aaiClientConfiguration);
         doReturn(aaiProducerClient).when(aaiProducerTask).resolveClient();
         aaiProducerTask.setAAIClientConfig();
-        aaiProducerTask.initConfigs();
         try {
             response = aaiProducerTask.execute(consumerDmaapModel);
         } catch (AAINotFoundException e) {
@@ -160,7 +158,6 @@
         when(aaiProducerTask.resolveConfiguration()).thenReturn(aaiClientConfiguration);
         doReturn(aaiProducerClient).when(aaiProducerTask).resolveClient();
         aaiProducerTask.setAAIClientConfig();
-        aaiProducerTask.initConfigs();
         try {
             response = aaiProducerTask.execute(consumerDmaapModel);
         } catch (AAINotFoundException e) {
diff --git a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTaskImplTest.java b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTaskImplTest.java
new file mode 100644
index 0000000..786c04f
--- /dev/null
+++ b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTaskImplTest.java
@@ -0,0 +1,123 @@
+/*
+ * ============LICENSE_START=======================================================
+ * PNF-REGISTRATION-HANDLER
+ * ================================================================================
+ * Copyright (C) 2018 NOKIA Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.dcaegen2.services.prh.tasks;
+
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoMoreInteractions;
+import static org.mockito.Mockito.when;
+
+import java.util.Optional;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.onap.dcaegen2.services.prh.config.DmaapConsumerConfiguration;
+import org.onap.dcaegen2.services.prh.config.ImmutableDmaapConsumerConfiguration;
+import org.onap.dcaegen2.services.prh.configuration.AppConfig;
+import org.onap.dcaegen2.services.prh.exceptions.PrhTaskException;
+import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
+import org.onap.dcaegen2.services.prh.model.ImmutableConsumerDmaapModel;
+import org.onap.dcaegen2.services.prh.service.consumer.ExtendedDmaapConsumerHttpClientImpl;
+
+/**
+ * @author <a href="mailto:przemyslaw.wasala@nokia.com">Przemysław Wąsala</a> on 5/17/18
+ */
+class DmaapConsumerTaskImplTest {
+
+    private static ConsumerDmaapModel consumerDmaapModel;
+    private static DmaapConsumerTaskImpl dmaapConsumerTask;
+    private static ExtendedDmaapConsumerHttpClientImpl extendedDmaapConsumerHttpClient;
+    private static AppConfig appConfig;
+    private static DmaapConsumerConfiguration dmaapConsumerConfiguration;
+
+
+    @BeforeAll
+    public static void setUp() {
+        dmaapConsumerConfiguration = new ImmutableDmaapConsumerConfiguration.Builder().consumerGroup("OpenDCAE-c12")
+            .consumerId("c12").dmaapContentType("application/json").dmaapHostName("54.45.33.2").dmaapPortNumber(1234)
+            .dmaapProtocol("https").dmaapUserName("PRH").dmaapUserPassword("PRH")
+            .dmaapTopicName("unauthenticated.SEC_OTHER_OUTPUT").timeoutMS(-1).messageLimit(-1).build();
+
+        consumerDmaapModel = ImmutableConsumerDmaapModel.builder().ipv4("10.16.123.234")
+            .ipv6("0:0:0:0:0:FFFF:0A10:7BEA")
+            .pnfName("NOKQTFCOC540002E").build();
+        appConfig = mock(AppConfig.class);
+    }
+
+    @Test
+    public void whenPassedObjectDoesntFit_DoNotThrowsPrhTaskException() {
+        //given
+        Object response = null;
+        extendedDmaapConsumerHttpClient = mock(ExtendedDmaapConsumerHttpClientImpl.class);
+
+        //when
+        when(extendedDmaapConsumerHttpClient.getHttpConsumerResponse()).thenReturn(Optional.empty());
+        when(appConfig.getDmaapConsumerConfiguration()).thenReturn(dmaapConsumerConfiguration);
+        dmaapConsumerTask = spy(new DmaapConsumerTaskImpl(appConfig));
+        when(dmaapConsumerTask.resolveConfiguration()).thenReturn(dmaapConsumerConfiguration);
+        doReturn(extendedDmaapConsumerHttpClient).when(dmaapConsumerTask).resolveClient();
+        dmaapConsumerTask.setDmaapClientConfig();
+        try {
+            response = dmaapConsumerTask.execute(consumerDmaapModel);
+        } catch (PrhTaskException e) {
+            e.printStackTrace();
+        }
+
+        //then
+        verify(extendedDmaapConsumerHttpClient, times(1)).getHttpConsumerResponse();
+        verifyNoMoreInteractions(extendedDmaapConsumerHttpClient);
+        Assertions.assertNull(response);
+    }
+
+    @Test
+    public void whenPassedObjectFits_ReturnsCorrectResponse() throws PrhTaskException {
+        //given
+        Object response;
+        extendedDmaapConsumerHttpClient = mock(ExtendedDmaapConsumerHttpClientImpl.class);
+        String message =
+            "{\"event\":{\"commonEventHeader\":{\"domain\":\"other\",\"eventId\":\"<<SerialNumber>>-reg\",\"eventName\""
+                + ":\"pnfRegistration_5GDU\",\"eventType\":\"pnfRegistration\",\"internalHeaderFields\":{},"
+                + "\"lastEpochMicrosec\":1519837825682,\"nfNamingCode\":\"5GRAN\",\"nfcNamingCode\":\"5DU\","
+                + "\"priority\":\"Normal\",\"reportingEntityName\":\"5GRAN_DU\",\"sequence\":0,\"sourceId\":"
+                + "\"<<SerialNumber>>\",\"sourceName\":\"5GRAN_DU\",\"startEpochMicrosec\":1519837825682,\"version\":3},"
+                + "\"otherFields\":{\"otherFieldsVersion\":1,\"pnfFamily\":\"BBU\",\"pnfLastServiceDate\":1517206400,"
+                + "\"pnfManufactureDate\":1516406400,\"pnfModelNumber\":\"AJ02\",\"pnfOamIpv4Address\":\"10.16.123.234\","
+                + "\"pnfOamIpv6Address\":\"0:0:0:0:0:FFFF:0A10:7BEA\",\"pnfSerialNumber\":\"QTFCOC540002E\","
+                + "\"pnfSoftwareVersion\":\"v4.5.0.1\",\"pnfType\":\"AirScale\",\"pnfVendorName\":\"Nokia\"}}}";
+        //when
+        when(extendedDmaapConsumerHttpClient.getHttpConsumerResponse()).thenReturn(Optional.of(message));
+        when(appConfig.getDmaapConsumerConfiguration()).thenReturn(dmaapConsumerConfiguration);
+        dmaapConsumerTask = spy(new DmaapConsumerTaskImpl(appConfig));
+        when(dmaapConsumerTask.resolveConfiguration()).thenReturn(dmaapConsumerConfiguration);
+        doReturn(extendedDmaapConsumerHttpClient).when(dmaapConsumerTask).resolveClient();
+        dmaapConsumerTask.setDmaapClientConfig();
+        response = dmaapConsumerTask.execute(consumerDmaapModel);
+
+        //then
+        verify(extendedDmaapConsumerHttpClient, times(1)).getHttpConsumerResponse();
+        verifyNoMoreInteractions(extendedDmaapConsumerHttpClient);
+        Assertions.assertNotNull(response);
+        Assertions.assertEquals(consumerDmaapModel, response);
+
+    }
+}
\ No newline at end of file
diff --git a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTaskSpy.java b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTaskSpy.java
index 1d86d24..60e1bd5 100644
--- a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTaskSpy.java
+++ b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTaskSpy.java
@@ -19,12 +19,16 @@
  */
 package org.onap.dcaegen2.services.prh.tasks;
 
+import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.when;
 
+import org.onap.dcaegen2.services.prh.config.AAIClientConfiguration;
 import org.onap.dcaegen2.services.prh.config.DmaapConsumerConfiguration;
 import org.onap.dcaegen2.services.prh.configuration.AppConfig;
+import org.onap.dcaegen2.services.prh.service.AAIProducerClient;
+import org.onap.dcaegen2.services.prh.service.consumer.ExtendedDmaapConsumerHttpClientImpl;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Primary;
@@ -38,8 +42,13 @@
     @Bean
     @Primary
     public Task registerSimpleDmaapConsumerTask() {
-        AppConfig appConfig = mock(AppConfig.class);
-        when(appConfig.getDmaapConsumerConfiguration()).thenReturn(mock(DmaapConsumerConfiguration.class));
-        return spy(new DmaapConsumerTaskImpl(appConfig));
+        AppConfig appConfig = spy(AppConfig.class);
+        doReturn(mock(DmaapConsumerConfiguration.class)).when(appConfig).getDmaapConsumerConfiguration();
+        DmaapConsumerTaskImpl dmaapConsumerTask = spy(new DmaapConsumerTaskImpl(appConfig));
+        ExtendedDmaapConsumerHttpClientImpl extendedDmaapConsumerHttpClient = mock(
+            ExtendedDmaapConsumerHttpClientImpl.class);
+        doReturn(mock(DmaapConsumerConfiguration.class)).when(dmaapConsumerTask).resolveConfiguration();
+        doReturn(extendedDmaapConsumerHttpClient).when(dmaapConsumerTask).resolveClient();
+        return dmaapConsumerTask;
     }
 }
diff --git a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/ScheduleControllerSpy.java b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/ScheduleControllerSpy.java
index 27083c0..2bff9e0 100644
--- a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/ScheduleControllerSpy.java
+++ b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/ScheduleControllerSpy.java
@@ -32,7 +32,6 @@
 @Configuration
 public class ScheduleControllerSpy {
 
-
     @Autowired
     private DmaapConsumerTask dmaapConsumerTaskImplSpy;
 
@@ -42,7 +41,6 @@
     @Autowired
     private AAIProducerTask aaiPublisherTaskImplSpy;
 
-
     @Bean
     @Primary
     public ScheduledTasks registerSimpleScheduledTask() {
