diff --git a/appc-adapters/appc-dmaap-adapter/appc-dmaap-adapter-bundle/pom.xml b/appc-adapters/appc-dmaap-adapter/appc-dmaap-adapter-bundle/pom.xml
index 8a2f6d9..1d8cbdb 100644
--- a/appc-adapters/appc-dmaap-adapter/appc-dmaap-adapter-bundle/pom.xml
+++ b/appc-adapters/appc-dmaap-adapter/appc-dmaap-adapter-bundle/pom.xml
@@ -72,6 +72,12 @@
 		</dependency>
 
 		<dependency>
+			<groupId>equinoxSDK381</groupId>
+			<artifactId>org.eclipse.osgi</artifactId>
+			<version>${equinox.osgi.version}</version>
+		</dependency>
+
+		<dependency>
 			<groupId>commons-codec</groupId>
 			<artifactId>commons-codec</artifactId>
 			</dependency>
@@ -199,4 +205,4 @@
 		</plugins>
 	</build>
 	<version>1.5.0-SNAPSHOT</version>
-</project>
+</project>
\ No newline at end of file
diff --git a/appc-adapters/appc-dmaap-adapter/appc-dmaap-adapter-bundle/src/main/java/org/onap/appc/adapter/messaging/dmaap/impl/DmaapProducerImpl.java b/appc-adapters/appc-dmaap-adapter/appc-dmaap-adapter-bundle/src/main/java/org/onap/appc/adapter/messaging/dmaap/impl/DmaapProducerImpl.java
index a2f2c9d..409dbeb 100644
--- a/appc-adapters/appc-dmaap-adapter/appc-dmaap-adapter-bundle/src/main/java/org/onap/appc/adapter/messaging/dmaap/impl/DmaapProducerImpl.java
+++ b/appc-adapters/appc-dmaap-adapter/appc-dmaap-adapter-bundle/src/main/java/org/onap/appc/adapter/messaging/dmaap/impl/DmaapProducerImpl.java
@@ -5,8 +5,6 @@
  * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Copyright (C) 2017 Amdocs
- * ================================================================================
- * Modifications Copyright (C) 2019 Ericsson
  * =============================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -53,11 +51,10 @@
 import org.osgi.framework.FrameworkUtil;
 import org.osgi.framework.ServiceReference;
 
-
 public class DmaapProducerImpl implements Producer {
 
     private static final EELFLogger    LOG             = EELFManager.getInstance().getLogger(DmaapProducerImpl.class);
-    private static       Configuration configuration   = ConfigurationFactory.getConfiguration();
+    private static final Configuration configuration   = ConfigurationFactory.getConfiguration();
 
     private Set<String>                topics;
 
@@ -202,7 +199,7 @@
         useHttps = yes;
     }
 
-    protected MetricService getMetricservice() {
+    private MetricService getMetricservice() {
         BundleContext bctx = FrameworkUtil.getBundle(MetricService.class).getBundleContext();
         ServiceReference sref = bctx.getServiceReference(MetricService.class.getName());
         if (sref != null) {
@@ -223,4 +220,4 @@
         return useHttps;
     }
 
-}
+}
\ No newline at end of file
diff --git a/appc-adapters/appc-dmaap-adapter/appc-dmaap-adapter-bundle/src/test/java/org/onap/appc/adapter/messaging/dmaap/impl/TestDmaapProducerImpl.java b/appc-adapters/appc-dmaap-adapter/appc-dmaap-adapter-bundle/src/test/java/org/onap/appc/adapter/messaging/dmaap/impl/TestDmaapProducerImpl.java
index 206b5a6..e6e665d 100644
--- a/appc-adapters/appc-dmaap-adapter/appc-dmaap-adapter-bundle/src/test/java/org/onap/appc/adapter/messaging/dmaap/impl/TestDmaapProducerImpl.java
+++ b/appc-adapters/appc-dmaap-adapter/appc-dmaap-adapter-bundle/src/test/java/org/onap/appc/adapter/messaging/dmaap/impl/TestDmaapProducerImpl.java
@@ -5,8 +5,6 @@
  * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. 
  * ============================================================================= 
  * Modifications Copyright (C) 2018 IBM. 
- * =================================================================================
- * Modifications Copyright (C) 2019 Ericsson
  * ============================================================================= 
  * Licensed under the Apache License, Version 2.0 (the "License"); 
  * you may not use this file except in compliance with the License. 
@@ -27,38 +25,18 @@
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
-import java.io.FileNotFoundException;
-import java.io.IOException;
+import static org.junit.Assert.fail;
+
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.Properties;
 import java.util.Set;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mockito;
-import org.onap.appc.configuration.Configuration;
-import org.onap.appc.configuration.ConfigurationFactory;
-import org.onap.appc.metricservice.MetricRegistry;
-import org.onap.appc.metricservice.MetricService;
-import org.onap.appc.metricservice.metric.DmaapRequestCounterBuilder;
-import org.onap.appc.metricservice.metric.DmaapRequestCounterMetric;
-import org.onap.appc.metricservice.metric.MetricBuilderFactory;
-import org.onap.appc.metricservice.metric.impl.MetricBuilderFactoryImpl;
-import org.onap.appc.metricservice.policy.PolicyBuilderFactory;
-import org.onap.appc.metricservice.policy.PublishingPolicy;
-import org.onap.appc.metricservice.policy.ScheduledPolicyBuilder;
-import org.osgi.framework.FrameworkUtil;
-import org.powermock.api.mockito.PowerMockito;
-import org.powermock.core.classloader.annotations.PrepareForTest;
-import org.powermock.modules.junit4.PowerMockRunner;
-import org.powermock.reflect.Whitebox;
-import com.att.nsa.mr.client.MRBatchingPublisher;
-import com.att.nsa.mr.client.MRClientFactory;
 
-@RunWith(PowerMockRunner.class)
-@PrepareForTest({ConfigurationFactory.class, FrameworkUtil.class, MRClientFactory.class})
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+
 public class TestDmaapProducerImpl {
     String[] hostList = { "192.168.1.1" };
     Collection<String> hosts = new HashSet<String>(Arrays.asList(hostList));
@@ -145,7 +123,6 @@
 
     @Test
     public void testPost() {
-        producer = new DmaapProducerImpl(hosts, topic, key, secret);
         boolean successful = producer.post("partition", "data");
         assertEquals(true, successful);
     }
@@ -159,9 +136,9 @@
         producer.close();
     }
 
+    
     @Test
     public void testCloseWithClient() {
-        producer = new DmaapProducerImpl(hosts, topic, key, secret);
         producer.post("partition", "data");
         assertNotNull(producer);
         producer.close();
@@ -181,49 +158,4 @@
 
     }
 
-    @Test
-    public void testInitMetric() throws FileNotFoundException, IOException 
-    {
-        Configuration configuration = Mockito.mock(Configuration.class);
-        Properties properties = new Properties();
-        properties.put("metric.enabled", "true");
-        Mockito.when(configuration.getProperties()).thenReturn(properties);
-        PowerMockito.mockStatic(MRClientFactory.class);
-        PowerMockito.when(MRClientFactory.createConsumer(Mockito.anyString())).thenThrow(new IOException());        
-        DmaapProducerImpl producer = Mockito.spy(new DmaapProducerImpl(hosts, topic, key, secret));
-        Whitebox.setInternalState(DmaapProducerImpl.class, "configuration", configuration);
-        MetricService metricService = Mockito.mock(MetricService.class);
-        MetricRegistry metricRegistry = Mockito.mock(MetricRegistry.class);
-        MetricBuilderFactory metricBuilderFactory = Mockito.spy(new MetricBuilderFactoryImpl());
-        DmaapRequestCounterBuilder builder = Mockito.mock(DmaapRequestCounterBuilder.class);
-        DmaapRequestCounterMetric metric = Mockito.mock(DmaapRequestCounterMetric.class);
-        Mockito.doNothing().when(metric).incrementPublishedMessage();
-        Mockito.when(builder.withName(Mockito.anyString())).thenReturn(builder);
-        Mockito.when(builder.withType(Mockito.any())).thenReturn(builder);
-        Mockito.when(builder.withPublishedMessage(Mockito.anyLong())).thenReturn(builder);
-        Mockito.when(builder.withRecievedMessage(Mockito.anyLong())).thenReturn(builder);
-        Mockito.when(builder.build()).thenReturn(metric);
-        Mockito.when(metricBuilderFactory.dmaapRequestCounterBuilder()).thenReturn(builder);
-        Mockito.when(metricRegistry.metric("DMAAP_KPI")).thenReturn(metric);
-        Mockito.when(metricRegistry.register(Mockito.any())).thenReturn(true);
-        PublishingPolicy policy = Mockito.mock(PublishingPolicy.class);
-        PolicyBuilderFactory policyFactory = Mockito.mock(PolicyBuilderFactory.class);
-        Mockito.when(metricRegistry.policyBuilderFactory()).thenReturn(policyFactory);
-        ScheduledPolicyBuilder policyBuilder = Mockito.mock(ScheduledPolicyBuilder.class);
-        Mockito.when(policyBuilder.withPublishers(Mockito.any())).thenReturn(policyBuilder);
-        Mockito.when(policyBuilder.withMetrics(Mockito.any())).thenReturn(policyBuilder);
-        Mockito.when(policyBuilder.build()).thenReturn(policy);
-        Mockito.when(policyFactory.scheduledPolicyBuilder()).thenReturn(policyBuilder);
-        Mockito.when(metricRegistry.metricBuilderFactory()).thenReturn(metricBuilderFactory);
-        Mockito.when(metricService.createRegistry("APPC")).thenReturn(metricRegistry);
-        Mockito.doReturn(metricService).when(producer).getMetricservice();
-        Set<MRBatchingPublisher> clients = new HashSet<>();
-        MRBatchingPublisher client = Mockito.mock(MRBatchingPublisher.class);
-        clients.add(client);
-        Mockito.doReturn(0).when(client).send(Mockito.anyString(), Mockito.anyString());
-        Whitebox.setInternalState(producer, "clients", clients);
-        producer.post(null, null);
-        Mockito.verify(policy).init();
-    }
-
-}
+}
\ No newline at end of file
