diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/etsicatalog/EtsiCatalogServiceProviderConfiguration.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/etsicatalog/EtsiCatalogServiceProviderConfiguration.java
index 6840dd3..860dfbb 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/etsicatalog/EtsiCatalogServiceProviderConfiguration.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/etsicatalog/EtsiCatalogServiceProviderConfiguration.java
@@ -20,16 +20,41 @@
 
 package org.onap.so.adapters.vnfmadapter.extclients.etsicatalog;
 
-import static org.onap.so.client.RestTemplateConfig.CONFIGURABLE_REST_TEMPLATE;
+import java.io.IOException;
+import java.security.KeyManagementException;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.cert.CertificateException;
+import java.util.concurrent.TimeUnit;
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSession;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.config.Registry;
+import org.apache.http.config.RegistryBuilder;
+import org.apache.http.conn.socket.ConnectionSocketFactory;
+import org.apache.http.conn.socket.PlainConnectionSocketFactory;
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
+import org.apache.http.ssl.SSLContextBuilder;
+import org.onap.logging.filter.spring.SpringClientPayloadFilter;
 import org.onap.so.adapters.vnfmadapter.extclients.AbstractServiceProviderConfiguration;
 import org.onap.so.configuration.rest.BasicHttpHeadersProvider;
-import org.onap.so.configuration.rest.HttpHeadersProvider;
+import org.onap.so.configuration.rest.HttpClientConnectionConfiguration;
+import org.onap.so.logging.jaxrs.filter.SOSpringClientFilter;
 import org.onap.so.rest.service.HttpRestServiceProvider;
 import org.onap.so.rest.service.HttpRestServiceProviderImpl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.core.io.Resource;
+import org.springframework.http.client.BufferingClientHttpRequestFactory;
+import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
 import org.springframework.web.client.RestTemplate;
 
 /**
@@ -41,16 +66,105 @@
 @Configuration
 public class EtsiCatalogServiceProviderConfiguration extends AbstractServiceProviderConfiguration {
 
-    @Bean(name = "etsiCatalogServiceProvider")
-    public HttpRestServiceProvider httpRestServiceProvider(
-            @Qualifier(CONFIGURABLE_REST_TEMPLATE) @Autowired final RestTemplate restTemplate) {
-        return getHttpRestServiceProvider(restTemplate, new BasicHttpHeadersProvider());
+    public static final String ETSI_CATALOG_REST_TEMPLATE_BEAN = "etsiCatalogRestTemplate";
+
+    public static final String ETSI_CATALOG_SERVICE_PROVIDER_BEAN = "etsiCatalogServiceProvider";
+
+    private final static Logger LOGGER = LoggerFactory.getLogger(EtsiCatalogServiceProviderConfiguration.class);
+
+    private final HttpClientConnectionConfiguration clientConnectionConfiguration;
+
+    @Value("${etsi-catalog-manager.http.client.ssl.trust-store:#{null}}")
+    private Resource trustStore;
+    @Value("${etsi-catalog-manager.http.client.ssl.trust-store-password:#{null}}")
+    private String trustStorePassword;
+
+    @Autowired
+    public EtsiCatalogServiceProviderConfiguration(
+            final HttpClientConnectionConfiguration clientConnectionConfiguration) {
+        this.clientConnectionConfiguration = clientConnectionConfiguration;
     }
 
-    private HttpRestServiceProvider getHttpRestServiceProvider(final RestTemplate restTemplate,
-            final HttpHeadersProvider httpHeadersProvider) {
+    @Bean
+    @Qualifier(ETSI_CATALOG_REST_TEMPLATE_BEAN)
+    public RestTemplate etsiCatalogRestTemplate() {
+        final RestTemplate restTemplate = new RestTemplate();
+        restTemplate.getInterceptors().add(new SOSpringClientFilter());
+        restTemplate.getInterceptors().add((new SpringClientPayloadFilter()));
+        return restTemplate;
+    }
+
+    @Bean
+    @Qualifier(ETSI_CATALOG_SERVICE_PROVIDER_BEAN)
+    public HttpRestServiceProvider etsiCatalogHttpRestServiceProvider(
+            @Qualifier(ETSI_CATALOG_REST_TEMPLATE_BEAN) final RestTemplate restTemplate) {
         setGsonMessageConverter(restTemplate);
-        return new HttpRestServiceProviderImpl(restTemplate, httpHeadersProvider);
+
+        final HttpClientBuilder httpClientBuilder = getHttpClientBuilder();
+        if (trustStore != null) {
+            try {
+                LOGGER.debug("Setting up HttpComponentsClientHttpRequestFactory with SSL Context");
+                LOGGER.debug("Setting client trust-store: {}", trustStore.getURL());
+                LOGGER.debug("Creating SSLConnectionSocketFactory with AllowAllHostsVerifier ... ");
+                final SSLContext sslContext = new SSLContextBuilder()
+                        .loadTrustMaterial(trustStore.getURL(), trustStorePassword.toCharArray()).build();
+                final SSLConnectionSocketFactory sslConnectionSocketFactory =
+                        new SSLConnectionSocketFactory(sslContext, AllowAllHostsVerifier.INSTANCE);
+                httpClientBuilder.setSSLSocketFactory(sslConnectionSocketFactory);
+                final Registry<ConnectionSocketFactory> socketFactoryRegistry = RegistryBuilder
+                        .<ConnectionSocketFactory>create().register("http", PlainConnectionSocketFactory.INSTANCE)
+                        .register("https", sslConnectionSocketFactory).build();
+
+                httpClientBuilder.setConnectionManager(getConnectionManager(socketFactoryRegistry));
+            } catch (final KeyManagementException | NoSuchAlgorithmException | KeyStoreException | CertificateException
+                    | IOException exception) {
+                LOGGER.error("Error reading truststore, TLS connection will fail.", exception);
+            }
+
+        } else {
+            LOGGER.debug("Setting connection manager without SSL ConnectionSocketFactory ...");
+            httpClientBuilder.setConnectionManager(getConnectionManager());
+        }
+
+        final HttpComponentsClientHttpRequestFactory factory =
+                new HttpComponentsClientHttpRequestFactory(httpClientBuilder.build());
+        restTemplate.setRequestFactory(new BufferingClientHttpRequestFactory(factory));
+
+        return new HttpRestServiceProviderImpl(restTemplate, new BasicHttpHeadersProvider().getHttpHeaders());
+    }
+
+    private PoolingHttpClientConnectionManager getConnectionManager(
+            final Registry<ConnectionSocketFactory> socketFactoryRegistry) {
+        return new PoolingHttpClientConnectionManager(socketFactoryRegistry, null, null, null,
+                clientConnectionConfiguration.getTimeToLiveInMins(), TimeUnit.MINUTES);
+    }
+
+    private PoolingHttpClientConnectionManager getConnectionManager() {
+        return new PoolingHttpClientConnectionManager(clientConnectionConfiguration.getTimeToLiveInMins(),
+                TimeUnit.MINUTES);
+    }
+
+    private HttpClientBuilder getHttpClientBuilder() {
+        return HttpClientBuilder.create().setMaxConnPerRoute(clientConnectionConfiguration.getMaxConnectionsPerRoute())
+                .setMaxConnTotal(clientConnectionConfiguration.getMaxConnections())
+                .setDefaultRequestConfig(getRequestConfig());
+    }
+
+    private RequestConfig getRequestConfig() {
+        return RequestConfig.custom().setSocketTimeout(clientConnectionConfiguration.getSocketTimeOutInMiliSeconds())
+                .setConnectTimeout(clientConnectionConfiguration.getConnectionTimeOutInMilliSeconds()).build();
+    }
+
+    private static final class AllowAllHostsVerifier implements HostnameVerifier {
+
+        private static final AllowAllHostsVerifier INSTANCE = new AllowAllHostsVerifier();
+
+        @Override
+        public boolean verify(final String hostname, final SSLSession session) {
+            LOGGER.debug("Skipping hostname verification ...");
+            return true;
+        }
+
     }
 
 }
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/etsicatalog/EtsiCatalogServiceProviderImpl.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/etsicatalog/EtsiCatalogServiceProviderImpl.java
index 30d0846..cae413c 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/etsicatalog/EtsiCatalogServiceProviderImpl.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/etsicatalog/EtsiCatalogServiceProviderImpl.java
@@ -20,6 +20,7 @@
 
 package org.onap.so.adapters.vnfmadapter.extclients.etsicatalog;
 
+import static org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.EtsiCatalogServiceProviderConfiguration.ETSI_CATALOG_SERVICE_PROVIDER_BEAN;
 import java.util.Optional;
 import org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.NsdmSubscription;
 import org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.PkgmSubscription;
@@ -53,14 +54,14 @@
 public class EtsiCatalogServiceProviderImpl implements EtsiCatalogServiceProvider {
     private static final Logger logger = LoggerFactory.getLogger(EtsiCatalogServiceProviderImpl.class);
 
-    @Qualifier("etsiCatalogServiceProvider")
     private final HttpRestServiceProvider httpServiceProvider;
     private final EtsiCatalogUrlProvider etsiCatalogUrlProvider;
     private final ConversionService conversionService;
 
     @Autowired
     public EtsiCatalogServiceProviderImpl(final EtsiCatalogUrlProvider etsiCatalogUrlProvider,
-            final HttpRestServiceProvider httpServiceProvider, final ConversionService conversionService) {
+            @Qualifier(ETSI_CATALOG_SERVICE_PROVIDER_BEAN) final HttpRestServiceProvider httpServiceProvider,
+            final ConversionService conversionService) {
         this.etsiCatalogUrlProvider = etsiCatalogUrlProvider;
         this.httpServiceProvider = httpServiceProvider;
         this.conversionService = conversionService;
@@ -118,8 +119,10 @@
                             if (inlineResponse2001 != null) {
                                 responses[index] = inlineResponse2001;
                             }
+                        } else {
+                            logger.error("Unable to find Converter for response class: {}",
+                                    vnfPackages[index].getClass());
                         }
-                        logger.error("Unable to find Converter for response class: {}", vnfPackages[index].getClass());
                     }
                     return Optional.of(responses);
                 }
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmHttpServiceProviderConfiguration.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmHttpServiceProviderConfiguration.java
new file mode 100644
index 0000000..9ed17e4
--- /dev/null
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmHttpServiceProviderConfiguration.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2020 Ericsson. 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.
+ * 
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.so.adapters.vnfmadapter.extclients.vnfm;
+
+import static org.onap.so.client.RestTemplateConfig.CONFIGURABLE_REST_TEMPLATE;
+import org.onap.so.adapters.vnfmadapter.extclients.AbstractServiceProviderConfiguration;
+import org.onap.so.configuration.rest.BasicHttpHeadersProvider;
+import org.onap.so.rest.service.HttpRestServiceProvider;
+import org.onap.so.rest.service.HttpRestServiceProviderImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.client.RestTemplate;
+
+/**
+ * @author Waqas Ikram (waqas.ikram@est.tech)
+ *
+ */
+@Configuration
+public class VnfmHttpServiceProviderConfiguration extends AbstractServiceProviderConfiguration {
+    public static final String VNFM_ADAPTER_HTTP_SERVICE_PROVIDER_BEAN = "vnfmAdapterHttpServiceProvider";
+
+    @Bean
+    @Qualifier(VNFM_ADAPTER_HTTP_SERVICE_PROVIDER_BEAN)
+    public HttpRestServiceProvider vnfmAdapterHttpRestServiceProvider(
+            @Autowired @Qualifier(CONFIGURABLE_REST_TEMPLATE) RestTemplate restTemplate) {
+        setGsonMessageConverter(restTemplate);
+        return new HttpRestServiceProviderImpl(restTemplate, new BasicHttpHeadersProvider().getHttpHeaders());
+    }
+
+}
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/packagemanagement/subscriptionmanagement/AbstractNotificationServiceProvider.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/packagemanagement/subscriptionmanagement/AbstractNotificationServiceProvider.java
index 86ca59c..d6b7ae7 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/packagemanagement/subscriptionmanagement/AbstractNotificationServiceProvider.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/packagemanagement/subscriptionmanagement/AbstractNotificationServiceProvider.java
@@ -19,16 +19,13 @@
  */
 package org.onap.so.adapters.vnfmadapter.packagemanagement.subscriptionmanagement;
 
-import static org.onap.so.client.RestTemplateConfig.CONFIGURABLE_REST_TEMPLATE;
+import static org.onap.so.adapters.vnfmadapter.extclients.vnfm.VnfmHttpServiceProviderConfiguration.VNFM_ADAPTER_HTTP_SERVICE_PROVIDER_BEAN;
 import java.nio.charset.StandardCharsets;
 import org.apache.commons.codec.binary.Base64;
 import org.onap.so.configuration.rest.BasicHttpHeadersProvider;
-import org.onap.so.configuration.rest.HttpHeadersProvider;
 import org.onap.so.rest.service.HttpRestServiceProvider;
-import org.onap.so.rest.service.HttpRestServiceProviderImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.web.client.RestTemplate;
 
 /**
  * A base class that can be extended by classes for providing notification services. Provides common methods that will
@@ -40,12 +37,10 @@
 public abstract class AbstractNotificationServiceProvider {
 
     @Autowired
-    @Qualifier(CONFIGURABLE_REST_TEMPLATE)
-    private RestTemplate restTemplate;
+    @Qualifier(VNFM_ADAPTER_HTTP_SERVICE_PROVIDER_BEAN)
+    private HttpRestServiceProvider httpRestServiceProvider;
 
-    protected HttpRestServiceProvider getHttpRestServiceProvider(final HttpHeadersProvider httpHeadersProvider) {
-        final HttpRestServiceProvider httpRestServiceProvider =
-                new HttpRestServiceProviderImpl(restTemplate, httpHeadersProvider);
+    protected HttpRestServiceProvider getHttpRestServiceProvider() {
         return httpRestServiceProvider;
     }
 
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/packagemanagement/subscriptionmanagement/BasicAuthNotificationServiceProvider.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/packagemanagement/subscriptionmanagement/BasicAuthNotificationServiceProvider.java
index 6f9d94e..cf0cdb0 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/packagemanagement/subscriptionmanagement/BasicAuthNotificationServiceProvider.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/packagemanagement/subscriptionmanagement/BasicAuthNotificationServiceProvider.java
@@ -47,10 +47,10 @@
         final HttpHeadersProvider httpHeadersProvider =
                 getBasicHttpHeadersProviderWithBasicAuth(subscriptionsAuthentication.getParamsBasic().getUserName(),
                         subscriptionsAuthentication.getParamsBasic().getPassword());
-        final HttpRestServiceProvider httpRestServiceProvider = getHttpRestServiceProvider(httpHeadersProvider);
+        final HttpRestServiceProvider httpRestServiceProvider = getHttpRestServiceProvider();
 
-        final ResponseEntity<Void> responseEntity =
-                httpRestServiceProvider.postHttpRequest(notification, callbackUri, Void.class);
+        final ResponseEntity<Void> responseEntity = httpRestServiceProvider.postHttpRequest(notification, callbackUri,
+                httpHeadersProvider.getHttpHeaders(), Void.class);
         if (responseEntity.getStatusCode().is2xxSuccessful()) {
             logger.info("Notification sent successfully.");
             return true;
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/packagemanagement/subscriptionmanagement/OAuthNotificationServiceProvider.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/packagemanagement/subscriptionmanagement/OAuthNotificationServiceProvider.java
index 496fb08..c065203 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/packagemanagement/subscriptionmanagement/OAuthNotificationServiceProvider.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/packagemanagement/subscriptionmanagement/OAuthNotificationServiceProvider.java
@@ -48,13 +48,14 @@
         final String token = getAccessToken(subscriptionsAuthentication);
 
         if (token == null) {
+            logger.error("Failed to get access token");
             return false;
         }
 
         final HttpHeadersProvider httpHeadersProvider = getHttpHeadersProvider(token);
-        final HttpRestServiceProvider httpRestServiceProvider = getHttpRestServiceProvider(httpHeadersProvider);
-        final ResponseEntity<Void> responseEntity =
-                httpRestServiceProvider.postHttpRequest(notification, callbackUri, Void.class);
+        final HttpRestServiceProvider httpRestServiceProvider = getHttpRestServiceProvider();
+        final ResponseEntity<Void> responseEntity = httpRestServiceProvider.postHttpRequest(notification, callbackUri,
+                httpHeadersProvider.getHttpHeaders(), Void.class);
         if (responseEntity.getStatusCode().is2xxSuccessful()) {
             logger.info("Notification sent successfully.");
             return true;
@@ -83,9 +84,9 @@
                 subscriptionsAuthentication.getParamsOauth2ClientCredentials().getClientId(),
                 subscriptionsAuthentication.getParamsOauth2ClientCredentials().getClientPassword());
 
-        final HttpRestServiceProvider httpRestServiceProvider = getHttpRestServiceProvider(httpHeadersProvider);
-        final ResponseEntity<OAuthTokenResponse> responseEntity =
-                httpRestServiceProvider.postHttpRequest(null, tokenEndpoint, OAuthTokenResponse.class);
+        final HttpRestServiceProvider httpRestServiceProvider = getHttpRestServiceProvider();
+        final ResponseEntity<OAuthTokenResponse> responseEntity = httpRestServiceProvider.postHttpRequest(null,
+                tokenEndpoint, httpHeadersProvider.getHttpHeaders(), OAuthTokenResponse.class);
         if (responseEntity.getStatusCode().is2xxSuccessful()) {
             if (responseEntity.getBody() != null) {
                 logger.info("Returning Access Token.");
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/EtsiSubscriptionNotificationControllerTest.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/EtsiSubscriptionNotificationControllerTest.java
index 322251e..29afa8c 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/EtsiSubscriptionNotificationControllerTest.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/EtsiSubscriptionNotificationControllerTest.java
@@ -278,7 +278,7 @@
         mockRestServer.expect(requestTo(CALLBACK_URI)).andExpect(method(HttpMethod.POST))
                 .andExpect(jsonPath("$.id").value(NOTIFICATION_ID))
                 .andExpect(jsonPath("$.notificationType").value(
-                        VnfPackageChangeNotification.NotificationTypeEnum.VNFPACKAGECHANGENOTIFICATION.toString()))
+                        VnfPackageChangeNotification.NotificationTypeEnum.VNFPACKAGECHANGENOTIFICATION.getValue()))
                 .andExpect(jsonPath("$.subscriptionId").value(SUBSCRIPTION_ID))
                 .andExpect(jsonPath("$.timeStamp").value(TIMESTAMP.toString()))
                 .andExpect(jsonPath("$.vnfPkgId").value(VNFPKG_ID.toString()))
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003PackageManagementControllerTest.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003PackageManagementControllerTest.java
index c5194cf..31e612a 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003PackageManagementControllerTest.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003PackageManagementControllerTest.java
@@ -25,7 +25,7 @@
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.onap.so.adapters.vnfmadapter.Constants.PACKAGE_MANAGEMENT_BASE_URL;
-import static org.onap.so.client.RestTemplateConfig.CONFIGURABLE_REST_TEMPLATE;
+import static org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.EtsiCatalogServiceProviderConfiguration.ETSI_CATALOG_REST_TEMPLATE_BEAN;
 import static org.springframework.test.web.client.match.MockRestRequestMatchers.method;
 import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
 import static org.springframework.test.web.client.response.MockRestResponseCreators.withStatus;
@@ -74,11 +74,11 @@
     private int port;
 
     @Autowired
-    @Qualifier(CONFIGURABLE_REST_TEMPLATE)
-    private RestTemplate testRestTemplate;
+    @Qualifier(ETSI_CATALOG_REST_TEMPLATE_BEAN)
+    private RestTemplate restTemplate;
 
     @Autowired
-    private TestRestTemplate restTemplate;
+    private TestRestTemplate testRestTemplate;
 
     private static final String VNF_PACKAGE_ID = "myVnfPackageId";
     private static final String ARTIFACT_PATH = "myArtifactPath";
@@ -104,8 +104,7 @@
 
     @Before
     public void setUp() {
-        final MockRestServiceServer.MockRestServiceServerBuilder builder =
-                MockRestServiceServer.bindTo(testRestTemplate);
+        final MockRestServiceServer.MockRestServiceServerBuilder builder = MockRestServiceServer.bindTo(restTemplate);
         builder.ignoreExpectOrder(true);
         mockRestServer = builder.build();
         basicHttpHeadersProvider = new BasicHttpHeadersProvider();
@@ -123,7 +122,7 @@
                 + VNF_PACKAGE_ID + "/package_content";
         final HttpEntity<?> request = new HttpEntity<>(basicHttpHeadersProvider.getHttpHeaders());
         final ResponseEntity<byte[]> responseEntity =
-                restTemplate.withBasicAuth("test", "test").exchange(testURL, HttpMethod.GET, request, byte[].class);
+                testRestTemplate.withBasicAuth("test", "test").exchange(testURL, HttpMethod.GET, request, byte[].class);
 
         assertEquals(byte[].class, responseEntity.getBody().getClass());
         assertArrayEquals(responseEntity.getBody(), responseArray);
@@ -164,7 +163,7 @@
 
 
         final ResponseEntity<ProblemDetails> responseEntity =
-                restTemplate.exchange(testURL, HttpMethod.GET, request, ProblemDetails.class);
+                testRestTemplate.exchange(testURL, HttpMethod.GET, request, ProblemDetails.class);
 
         assertTrue(responseEntity.getBody() instanceof ProblemDetails);
         assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, responseEntity.getStatusCode());
@@ -226,7 +225,7 @@
                 + VNF_PACKAGE_ID + "/artifacts/" + ARTIFACT_PATH;
         final HttpEntity<?> request = new HttpEntity<>(basicHttpHeadersProvider.getHttpHeaders());
         final ResponseEntity<byte[]> responseEntity =
-                restTemplate.withBasicAuth("test", "test").exchange(testURL, HttpMethod.GET, request, byte[].class);
+                testRestTemplate.withBasicAuth("test", "test").exchange(testURL, HttpMethod.GET, request, byte[].class);
 
         assertEquals(byte[].class, responseEntity.getBody().getClass());
         assertArrayEquals(responseEntity.getBody(), responseArray);
@@ -267,7 +266,7 @@
 
         final HttpEntity<?> request = new HttpEntity<>(basicHttpHeadersProvider.getHttpHeaders());
         final ResponseEntity<ProblemDetails> responseEntity =
-                restTemplate.exchange(testURL, HttpMethod.GET, request, ProblemDetails.class);
+                testRestTemplate.exchange(testURL, HttpMethod.GET, request, ProblemDetails.class);
 
         assertNotNull(responseEntity.getBody());
         assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, responseEntity.getStatusCode());
@@ -331,7 +330,7 @@
         final String testURL = localhostUrl + port + VNFPKGM_BASE_URL;
         final HttpEntity<?> request = new HttpEntity<>(basicHttpHeadersProvider.getHttpHeaders());
 
-        final ResponseEntity<InlineResponse2001[]> responseEntity = restTemplate.withBasicAuth("test", "test")
+        final ResponseEntity<InlineResponse2001[]> responseEntity = testRestTemplate.withBasicAuth("test", "test")
                 .exchange(testURL, HttpMethod.GET, request, InlineResponse2001[].class);
 
         assertEquals(HttpStatus.OK, responseEntity.getStatusCode());
@@ -412,7 +411,7 @@
 
         final String testURL = localhostUrl + port + VNFPKGM_BASE_URL + "/" + VNF_PACKAGE_ID;
         final HttpEntity<?> request = new HttpEntity<>(basicHttpHeadersProvider.getHttpHeaders());
-        final ResponseEntity<InlineResponse2001> responseEntity = restTemplate.withBasicAuth("test", "test")
+        final ResponseEntity<InlineResponse2001> responseEntity = testRestTemplate.withBasicAuth("test", "test")
                 .exchange(testURL, HttpMethod.GET, request, InlineResponse2001.class);
 
         assertEquals(HttpStatus.OK, responseEntity.getStatusCode());
@@ -484,7 +483,8 @@
                 + VNF_PACKAGE_ID + "\" \n" + "endpoint.", problemDetails.getDetail());
     }
 
-    // The below test method is here to improve code coverage and provide a foundation for writing future tests
+    // The below test method is here to improve code coverage and provide a foundation for writing
+    // future tests
     @Test
     public void testGetPackageVnfd_ValidArray_Success() {
         final byte[] responseArray = buildByteArrayWithRandomData(10);
@@ -497,7 +497,7 @@
                 "http://localhost:" + port + PACKAGE_MANAGEMENT_BASE_URL + "/vnf_packages/" + VNF_PACKAGE_ID + "/vnfd";
         final HttpEntity<?> request = new HttpEntity<>(basicHttpHeadersProvider.getHttpHeaders());
         final ResponseEntity<byte[]> responseEntity =
-                restTemplate.withBasicAuth("test", "test").exchange(testURL, HttpMethod.GET, request, byte[].class);
+                testRestTemplate.withBasicAuth("test", "test").exchange(testURL, HttpMethod.GET, request, byte[].class);
 
         assertEquals(byte[].class, responseEntity.getBody().getClass());
         assertArrayEquals(responseEntity.getBody(), responseArray);
@@ -592,7 +592,7 @@
     private ResponseEntity<ProblemDetails> sendHttpRequest(final String url) {
         final String testURL = localhostUrl + port + VNFPKGM_BASE_URL + "/" + url;
         final HttpEntity<?> request = new HttpEntity<>(basicHttpHeadersProvider.getHttpHeaders());
-        return restTemplate.withBasicAuth("test", "test").exchange(testURL, HttpMethod.GET, request,
+        return testRestTemplate.withBasicAuth("test", "test").exchange(testURL, HttpMethod.GET, request,
                 ProblemDetails.class);
     }
 
@@ -652,4 +652,5 @@
         final VNFPKGMLinkSerializer vnfpkgmLinkSerializer = new VNFPKGMLinkSerializer().self(uriLink);
         return vnfpkgmLinkSerializer;
     }
+
 }
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003PackageManagementSubscriptionControllerTest.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003PackageManagementSubscriptionControllerTest.java
index a2828b1..c269af8 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003PackageManagementSubscriptionControllerTest.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003PackageManagementSubscriptionControllerTest.java
@@ -28,7 +28,7 @@
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import static org.onap.so.adapters.vnfmadapter.Constants.PACKAGE_MANAGEMENT_BASE_URL;
-import static org.onap.so.client.RestTemplateConfig.CONFIGURABLE_REST_TEMPLATE;
+import static org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.EtsiCatalogServiceProviderConfiguration.ETSI_CATALOG_REST_TEMPLATE_BEAN;
 import static org.springframework.test.web.client.match.MockRestRequestMatchers.method;
 import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
 import static org.springframework.test.web.client.response.MockRestResponseCreators.withStatus;
@@ -102,7 +102,7 @@
     private static final String LOCALHOST_URL = "http://localhost:";
 
     @Autowired
-    @Qualifier(CONFIGURABLE_REST_TEMPLATE)
+    @Qualifier(ETSI_CATALOG_REST_TEMPLATE_BEAN)
     private RestTemplate restTemplate;
     private MockRestServiceServer mockRestServiceServer;
     @Autowired
diff --git a/packages/docker/pom.xml b/packages/docker/pom.xml
index b231ded..3a9ec37 100644
--- a/packages/docker/pom.xml
+++ b/packages/docker/pom.xml
@@ -42,20 +42,20 @@
             </goals>
             <configuration>
               <source>
-								println 'Project version: ' + project.properties['so.project.version'];
-								def versionArray;
-								if ( project.properties['so.project.version'] != null ) {
-									versionArray = project.properties['so.project.version'].split('-');
-								}
+                println 'Project version: ' + project.properties['so.project.version'];
+                def versionArray;
+                if ( project.properties['so.project.version'] != null ) {
+                  versionArray = project.properties['so.project.version'].split('-');
+                }
 
-								if ( project.properties['so.project.version'].endsWith("-SNAPSHOT") ) {
-									project.properties['project.docker.latesttag.version']=versionArray[0] + "-SNAPSHOT-latest";
-								} else {
-									project.properties['project.docker.latesttag.version']=versionArray[0] + "-STAGING-latest";
-								}
+                if ( project.properties['so.project.version'].endsWith("-SNAPSHOT") ) {
+                  project.properties['project.docker.latesttag.version']=versionArray[0] + "-SNAPSHOT-latest";
+                } else {
+                  project.properties['project.docker.latesttag.version']=versionArray[0] + "-STAGING-latest";
+                }
 
-								println 'New tag for docker: ' + project.properties['project.docker.latesttag.version'];
-							</source>
+                println 'New tag for docker: ' + project.properties['project.docker.latesttag.version'];
+              </source>
             </configuration>
           </execution>
         </executions>
