* ================================================================================
  * Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved.
  * Modifications Copyright (C) 2022 Bell Canada. All rights reserved.
+ * Modifications Copyright (C) 2022 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
     public static final String REG_PDP_MODIFY_MAP = "object:pdp/modify/map";
     public static final String REG_METER_REGISTRY = "object:meter/registry";
 
-    // topic names
-    public static final String TOPIC_POLICY_PDP_PAP = "POLICY-PDP-PAP";
-    public static final String TOPIC_POLICY_NOTIFICATION = "POLICY-NOTIFICATION";
-    public static final String TOPIC_POLICY_HEARTBEAT = "POLICY-HEARTBEAT";
-
     // policy components names
-    public static final String POLICY_API = "api";
-    public static final String POLICY_DISTRIBUTION = "distribution";
     public static final String POLICY_PAP = "pap";
     public static final String POLICY_PDPS = "pdps";
 
 
  * ONAP PAP
  * ================================================================================
  * Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2021 Nordix Foundation.
+ * Modifications Copyright (C) 2021-2022 Nordix Foundation.
  * Modifications Copyright (C) 2021-2022 Bell Canada. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
 
 import java.util.LinkedList;
 import java.util.List;
+import lombok.Getter;
 import org.onap.policy.common.parameters.ParameterService;
 import org.onap.policy.common.utils.services.Registry;
 import org.onap.policy.models.base.PfModelException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.boot.context.event.ApplicationReadyEvent;
 import org.springframework.context.event.EventListener;
 
 public class PdpMessageGenerator {
     private static final Logger LOGGER = LoggerFactory.getLogger(PdpMessageGenerator.class);
 
-    private static final String PAP_GROUP_PARAMS_NAME = "PapGroup";
-
-    private boolean includeHeartBeat;
+    private final boolean includeHeartBeat;
     /**
      * Lock used when updating PDPs.
      */
     @Autowired
     private PolicyNotifier policyNotifier;
 
+    @Getter
+    @Value("${pap.name}")
+    private String papGroupParamName = "PapGroup";
+
     /**
      * Constructs the object.
      *
         requestMap = Registry.get(PapConstants.REG_PDP_MODIFY_MAP, PdpModifyRequestMap.class);
 
         if (includeHeartBeat) {
-            PapParameterGroup params = ParameterService.get(PAP_GROUP_PARAMS_NAME);
+            PapParameterGroup params = ParameterService.get(papGroupParamName);
             heartBeatMs = params.getPdpParameters().getHeartBeatMs();
 
         } else {
      * Method to return a list of policies.
      *
      * @param subGroup PdpSubGroup to retrieve policies from
+     * @return a list of ToscaPolicy
      * @throws PfModelException the exception
-     * @returns a list of ToscaPolicy
      **/
     public List<ToscaPolicy> getToscaPolicies(final PdpSubGroup subGroup) throws PfModelException {
 
      * @param pdpInstanceId the pdp instance
      * @param pdpState the new state as per the PDP_STATE_CHANGE change message
      * @param policies list of policies as per the PDP_UPDATE message
-     * @throws PfModelException the exception
      */
     protected void updateDeploymentStatus(final String pdpGroupName, final String pdpType, final String pdpInstanceId,
         PdpState pdpState, List<ToscaPolicy> policies) {
 
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2022 Bell Canada. All rights reserved.
+ *  Modifications Copyright (C) 2022 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.pap.main.config;
 
-import java.util.Arrays;
 import java.util.List;
 import org.onap.policy.common.spring.utils.YamlHttpMessageConverter;
 import org.springframework.context.annotation.Configuration;
     @Override
     public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
         var yamlConverter = new YamlHttpMessageConverter();
-        yamlConverter.setSupportedMediaTypes(Arrays.asList(MediaType.parseMediaType("application/yaml")));
+        yamlConverter.setSupportedMediaTypes(List.of(MediaType.parseMediaType("application/yaml")));
         converters.add(yamlConverter);
     }
 }
\ No newline at end of file
 
 /*-
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2019-2020 Nordix Foundation.
+ *  Copyright (C) 2019-2020, 2022 Nordix Foundation.
  *  Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
  *  Modifications Copyright (C) 2020-2022 Bell Canada. All rights reserved.
  * ================================================================================
     @Value("${server.port}")
     private int port;
 
+    @Value("${pap.topic.pdp-pap.name:POLICY-PDP-PAP}")
+    private String topicPolicyPdpPap;
+
     /**
      * This method is used to initialize clients and executor.
      */
     private HealthCheckReport verifyDmaapClient(HttpClient httpClient, Response resp) {
         DmaapGetTopicResponse dmaapResponse = resp.readEntity(DmaapGetTopicResponse.class);
         var topicVerificationStatus = (dmaapResponse.getTopics() != null
-                        && dmaapResponse.getTopics().contains(PapConstants.TOPIC_POLICY_PDP_PAP));
-        String message = (topicVerificationStatus ? "PAP to DMaaP connection check is successfull"
+                        && dmaapResponse.getTopics().contains(topicPolicyPdpPap));
+        String message = (topicVerificationStatus ? "PAP to DMaaP connection check is successful"
                         : "PAP to DMaaP connection check failed");
         int code = (topicVerificationStatus ? resp.getStatus() : 503);
         return createHealthCheckReport(httpClient.getName(), httpClient.getBaseUrl(), code,
 
  * ONAP PAP
  * ================================================================================
  * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2021 Nordix Foundation.
+ * Modifications Copyright (C) 2021-2022 Nordix Foundation.
  * Modifications Copyright (C) 2022 Bell Canada. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
     /**
      * Map's a policy's identifier to the policies for deployment.
      */
-    private Map<ToscaConceptIdentifier, ToscaPolicy> policiesToBeDeployed = new HashMap<>();
+    private final Map<ToscaConceptIdentifier, ToscaPolicy> policiesToBeDeployed = new HashMap<>();
 
     /**
      * Set of policies to be undeployed.
      */
-    private Set<ToscaConceptIdentifier> policiesToBeUndeployed = new HashSet<>();
+    private final Set<ToscaConceptIdentifier> policiesToBeUndeployed = new HashSet<>();
 
     /**
      * User starting requests.
      */
     private final DeploymentStatus deployStatus;
 
-    private PolicyAuditManager auditManager;
+    private final PolicyAuditManager auditManager;
 
-    private ToscaServiceTemplateService toscaService;
+    private final ToscaServiceTemplateService toscaService;
 
-    private PdpGroupService pdpGroupService;
+    private final PdpGroupService pdpGroupService;
 
     /**
      * Constructs the object.
      *
      * @param type desired policy type
      * @return the active groups supporting the given policy
-     * @throws PfModelException if an error occurred
      */
-    public List<PdpGroup> getActivePdpGroupsByPolicyType(ToscaConceptIdentifier type) throws PfModelException {
+    public List<PdpGroup> getActivePdpGroupsByPolicyType(ToscaConceptIdentifier type) {
         /*
          * Cannot use computeIfAbsent() because the enclosed code throws an unchecked exception and handling that would
          * obfuscate the code too much, thus disabling the sonar.
     /**
      * Gets the list of policies to be deployed to the PDPs.
      *
-     * @returns a list of policies to be deployed
+     * @return a list of policies to be deployed
      */
     public List<ToscaPolicy> getPoliciesToBeDeployed() {
         return new LinkedList<>(this.policiesToBeDeployed.values());
     /**
      * Gets the list of policies to be undeployed from the PDPs.
      *
-     * @returns a list of policies to be undeployed
+     * @return a list of policies to be undeployed
      */
     public List<ToscaConceptIdentifier> getPoliciesToBeUndeployed() {
         return new LinkedList<>(this.policiesToBeUndeployed);
 
 /*-
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2019 Nordix Foundation.
+ *  Copyright (C) 2019, 2022 Nordix Foundation.
  *  Modifications Copyright (C) 2019-2021 AT&T Intellectual Property.
  *  Modifications Copyright (C) 2021-2022 Bell Canada. All rights reserved.
  * ================================================================================
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicReference;
+import lombok.Getter;
 import org.onap.policy.common.endpoints.event.comm.TopicEndpointManager;
 import org.onap.policy.common.endpoints.event.comm.TopicListener;
 import org.onap.policy.common.endpoints.event.comm.TopicSource;
 import org.onap.policy.pap.main.parameters.PapParameterGroup;
 import org.onap.policy.pap.main.parameters.PdpModifyRequestMapParams;
 import org.onap.policy.pap.main.rest.PapStatisticsManager;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.event.ContextClosedEvent;
 import org.springframework.context.event.ContextRefreshedEvent;
 import org.springframework.context.event.EventListener;
  */
 @Component
 public class PapActivator extends ServiceManagerContainer {
+
+    // topic names
+    @Getter
+    @Value("${pap.topic.pdp-pap.name}")
+    private String topicPolicyPdpPap = "POLICY-PDP-PAP";
+
+    @Getter
+    @Value("${pap.topic.notification.name}")
+    private String topicPolicyNotification = "POLICY-NOTIFICATION";
+
+    @Getter
+    @Value("${pap.topic.heartbeat.name}")
+    private String topicPolicyHeartbeat = "POLICY-HEARTBEAT";
+
     private static final String[] MSG_TYPE_NAMES = { "messageName" };
     private static final String[] REQ_ID_NAMES = { "response", "responseTo" };
 
     /**
-     * Max number of heat beats that can be missed before PAP removes a PDP.
+     * Max number of heart beats that can be missed before PAP removes a PDP.
      */
     private static final int MAX_MISSED_HEARTBEATS = 3;
 
-    private PapParameterGroup papParameterGroup;
+    private final PapParameterGroup papParameterGroup;
 
     /**
      * Listens for messages on the topic, decodes them into a {@link PdpStatus} message, and then dispatches them to
             () -> heartbeatMsgDispatcher.unregister(PdpMessageType.PDP_STATUS.name()));
 
         addAction("Response Message Dispatcher",
-            () -> registerMsgDispatcher(responseMsgDispatcher, PapConstants.TOPIC_POLICY_PDP_PAP),
-            () -> unregisterMsgDispatcher(responseMsgDispatcher, PapConstants.TOPIC_POLICY_PDP_PAP));
+            () -> registerMsgDispatcher(responseMsgDispatcher, topicPolicyPdpPap),
+            () -> unregisterMsgDispatcher(responseMsgDispatcher, topicPolicyPdpPap));
 
         addAction("Heartbeat Message Dispatcher",
-            () -> registerMsgDispatcher(heartbeatMsgDispatcher, PapConstants.TOPIC_POLICY_HEARTBEAT),
-            () -> unregisterMsgDispatcher(heartbeatMsgDispatcher, PapConstants.TOPIC_POLICY_HEARTBEAT));
+            () -> registerMsgDispatcher(heartbeatMsgDispatcher, topicPolicyHeartbeat),
+            () -> unregisterMsgDispatcher(heartbeatMsgDispatcher, topicPolicyHeartbeat));
 
         addAction("topics",
             TopicEndpointManager.getManager()::start,
 
         addAction("PDP publisher",
             () -> {
-                pdpPub.set(new Publisher<>(PapConstants.TOPIC_POLICY_PDP_PAP));
+                pdpPub.set(new Publisher<>(topicPolicyPdpPap));
                 startThread(pdpPub.get());
             },
             () -> pdpPub.get().stop());
 
         addAction("Policy Notification publisher",
             () -> {
-                notifyPub.set(new Publisher<>(PapConstants.TOPIC_POLICY_NOTIFICATION));
+                notifyPub.set(new Publisher<>(topicPolicyNotification));
                 startThread(notifyPub.get());
                 policyNotifier.setPublisher(notifyPub.get());
             },
 
 pap:
   name: PapGroup
   aaf: false
+  topic:
+    pdp-pap.name: POLICY-PDP-PAP
+    notification.name: POLICY-NOTIFICATION
+    heartbeat.name: POLICY-HEARTBEAT
   pdpParameters:
     heartBeatMs: 120000
     updateParameters:
   savePdpStatisticsInDb: true
   topicParameterGroup:
     topicSources:
-    - topic: POLICY-PDP-PAP
+    - topic: ${pap.topic.pdp-pap.name}
       servers:
       - message-router
       topicCommInfrastructure: dmaap
       fetchTimeout: 15000
-    - topic: POLICY-HEARTBEAT
-      effectiveTopic: POLICY-PDP-PAP
+    - topic: ${pap.topic.heartbeat.name}
+      effectiveTopic: ${pap.topic.pdp-pap.name}
       consumerGroup: policy-pap
       servers:
       - message-router
       topicCommInfrastructure: dmaap
       fetchTimeout: 15000
     topicSinks:
-    - topic: POLICY-PDP-PAP
+    - topic: ${pap.topic.pdp-pap.name}
       servers:
       - message-router
       topicCommInfrastructure: dmaap
-    - topic: POLICY-NOTIFICATION
+    - topic: ${pap.topic.notification.name}
       servers:
       - message-router
       topicCommInfrastructure: dmaap
 
  * ONAP PAP
  * ================================================================================
  * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2021 Nordix Foundation.
+ * Modifications Copyright (C) 2021-2022 Nordix Foundation.
  * Modifications Copyright (C) 2022 Bell Canada. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.mockito.ArgumentCaptor;
-import org.mockito.invocation.InvocationOnMock;
 import org.mockito.stubbing.Answer;
 import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
 import org.onap.policy.common.endpoints.listeners.RequestIdDispatcher;
     protected static final PdpState MY_STATE = PdpState.SAFE;
     protected static final PdpState DIFF_STATE = PdpState.TERMINATED;
     protected static final int RETRIES = 1;
+    protected static final String PDP_PAP_TOPIC = "POLICY-PDP-PAP";
 
     protected Publisher<PdpMessage> publisher;
     protected PolicyNotifier notifier;
         listener = mock(RequestListener.class);
         PdpParameters pdpParams = mock(PdpParameters.class);
 
-        doAnswer(new Answer<Object>() {
-            @Override
-            public Object answer(InvocationOnMock invocation) throws Throwable {
-                queue.add(invocation.getArgument(0, QueueToken.class));
-                return null;
-            }
+        doAnswer((Answer<Object>) invocation -> {
+            queue.add(invocation.getArgument(0, QueueToken.class));
+            return null;
         }).when(publisher).enqueue(any());
 
         when(timers.register(any(), any())).thenReturn(timer);
 
         verify(dispatcher).register(any(), processResp.capture());
 
-        processResp.getValue().onTopicEvent(CommInfrastructure.NOOP, PapConstants.TOPIC_POLICY_PDP_PAP, response);
+        processResp.getValue().onTopicEvent(CommInfrastructure.NOOP, PDP_PAP_TOPIC, response);
     }
 
     /**
 
  * ================================================================================
  * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
  * Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
+ * Modifications Copyright (C) 2022 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 import org.onap.policy.common.utils.coder.StandardCoder;
 import org.onap.policy.models.pdp.concepts.PdpMessage;
 import org.onap.policy.models.pdp.concepts.PdpStateChange;
-import org.onap.policy.pap.main.PapConstants;
 import org.onap.policy.pap.main.PolicyPapException;
 import org.onap.policy.pap.main.parameters.CommonTestData;
 import org.onap.policy.pap.main.parameters.PapParameterGroup;
     private static final String JSON1;
     private static final String JSON2;
 
+    protected static final String PDP_PAP_TOPIC = "POLICY-PDP-PAP";
+
     static {
         try {
             Coder coder = new StandardCoder();
     /**
      * Configures the topic and attaches a listener.
      *
-     * @throws Exception if an error occurs
      */
     @BeforeClass
-    public static void setUpBeforeClass() throws Exception {
+    public static void setUpBeforeClass() {
         final PapParameterGroup parameterGroup = new CommonTestData().getPapParameterGroup(6969);
         TopicEndpointManager.getManager().shutdown();
 
     }
 
     @AfterClass
-    public static void tearDownAfterClass() throws Exception {
+    public static void tearDownAfterClass() {
         TopicEndpointManager.getManager().shutdown();
     }
 
     public void setUp() throws Exception {
         super.setUp();
 
-        pub = new Publisher<>(PapConstants.TOPIC_POLICY_PDP_PAP);
+        pub = new Publisher<>(PDP_PAP_TOPIC);
 
         listener = new MyListener();
-        TopicEndpointManager.getManager().getNoopTopicSink(PapConstants.TOPIC_POLICY_PDP_PAP).register(listener);
+        TopicEndpointManager.getManager().getNoopTopicSink(PDP_PAP_TOPIC).register(listener);
     }
 
     /**
      */
     @After
     public void tearDown() throws Exception {
-        TopicEndpointManager.getManager().getNoopTopicSink(PapConstants.TOPIC_POLICY_PDP_PAP).unregister(listener);
+        TopicEndpointManager.getManager().getNoopTopicSink(PDP_PAP_TOPIC).unregister(listener);
 
         super.tearDown();
     }
     }
 
     @Test
-    public void testPublisher_Ex() throws Exception {
+    public void testPublisher_Ex() {
         assertThatThrownBy(() -> new Publisher<>("unknwon-topic")).isInstanceOf(PolicyPapException.class);
     }
 
 
 /*
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2019 Nordix Foundation.
+ *  Copyright (C) 2019, 2022 Nordix Foundation.
  *  Modifications Copyright (C) 2019 AT&T Intellectual Property.
  *  Modifications Copyright (C) 2022 Bell Canada. All rights reserved.
  * ================================================================================
 import static org.mockito.Mockito.when;
 
 import javax.ws.rs.client.Invocation;
+import javax.ws.rs.client.SyncInvoker;
 import org.junit.Test;
 import org.onap.policy.common.endpoints.report.HealthCheckReport;
 import org.onap.policy.models.base.PfModelRuntimeException;
 import org.springframework.boot.test.mock.mockito.MockBean;
+import org.springframework.test.context.ActiveProfiles;
 
 /**
- * Class to perform unit test of {@link PapRestServer}.
+ * Class to perform unit test of {@link HealthCheckRestControllerV1}.
  *
  * @author Ram Krishna Verma (ram.krishna.verma@est.tech)
  */
+@ActiveProfiles("test")
 public class TestHealthCheckRestControllerV1 extends CommonPapRestServer {
 
     private static final String HEALTHCHECK_ENDPOINT = "healthcheck";
     public void testHealthCheckSuccess() throws Exception {
         final Invocation.Builder invocationBuilder = sendRequest(HEALTHCHECK_ENDPOINT);
         final HealthCheckReport report = invocationBuilder.get(HealthCheckReport.class);
-        validateHealthCheckReport(NAME, SELF, true, 200, ALIVE, report);
+        validateHealthCheckReport(true, 200, ALIVE, report);
 
         // verify it fails when no authorization info is included
-        checkUnauthRequest(HEALTHCHECK_ENDPOINT, req -> req.get());
+        checkUnauthRequest(HEALTHCHECK_ENDPOINT, SyncInvoker::get);
     }
 
     @Test
         var response = invocationBuilder.get();
         var report = response.readEntity(HealthCheckReport.class);
         assertThat(response.getStatus()).isEqualTo(503);
-        validateHealthCheckReport(NAME, SELF, false, 503, NOT_ALIVE, report);
+        validateHealthCheckReport(false, 503, NOT_ALIVE, report);
     }
 
     @Test
         var response = invocationBuilder.get();
         var report = response.readEntity(HealthCheckReport.class);
         assertThat(response.getStatus()).isEqualTo(503);
-        validateHealthCheckReport(NAME, SELF, false, 503, NOT_ALIVE, report);
+        validateHealthCheckReport(false, 503, NOT_ALIVE, report);
     }
 
-    private void validateHealthCheckReport(final String name, final String url, final boolean healthy, final int code,
-            final String message, final HealthCheckReport report) {
-        assertEquals(name, report.getName());
-        assertEquals(url, report.getUrl());
+    private void validateHealthCheckReport(final boolean healthy, final int code,
+                                           final String message, final HealthCheckReport report) {
+        assertEquals(CommonPapRestServer.NAME, report.getName());
+        assertEquals(CommonPapRestServer.SELF, report.getUrl());
         assertEquals(healthy, report.isHealthy());
         assertEquals(code, report.getCode());
         assertEquals(message, report.getMessage());
 
 /*
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2019 Nordix Foundation.
+ *  Copyright (C) 2019, 2022 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 import org.onap.policy.models.pdp.concepts.PdpGroup;
 import org.onap.policy.models.pdp.concepts.PdpGroups;
 import org.onap.policy.models.pdp.concepts.PdpSubGroup;
+import org.springframework.test.context.ActiveProfiles;
 
 /**
  * Note: this tests failure cases; success cases are tested by tests in the "e2e" package.
  */
+@ActiveProfiles("test")
 public class TestPdpGroupCreateOrUpdateControllerV1 extends CommonPapRestServer {
 
     private static final String CREATEORUPDATE_GROUPS_ENDPOINT = "pdps/groups/batch";
 
 /*
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2019 Nordix Foundation.
+ *  Copyright (C) 2019, 2022 Nordix Foundation.
  *  Modifications Copyright (C) 2019 AT&T Intellectual Property.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
 import static org.junit.Assert.assertEquals;
 
 import javax.ws.rs.client.Invocation;
+import javax.ws.rs.client.SyncInvoker;
 import javax.ws.rs.core.Response;
 import org.junit.Test;
 import org.onap.policy.models.pap.concepts.PdpGroupDeleteResponse;
+import org.springframework.test.context.ActiveProfiles;
 
 /**
  * Note: this tests failure cases; success cases are tested by tests in the "e2e" package.
  */
+@ActiveProfiles("test")
 public class TestPdpGroupDeleteControllerV1 extends CommonPapRestServer {
 
     private static final String GROUP_NOT_FOUND = "group not found";
         assertEquals(GROUP_NOT_FOUND, resp.getErrorDetails());
 
         // verify it fails when no authorization info is included
-        checkUnauthRequest(uri, req -> req.delete());
+        checkUnauthRequest(uri, SyncInvoker::delete);
     }
 
     @Test
         assertEquals("cannot find policy: my-name null", resp.getErrorDetails());
 
         // verify it fails when no authorization info is included
-        checkUnauthRequest(uri, req -> req.delete());
+        checkUnauthRequest(uri, SyncInvoker::delete);
     }
 
     @Test
         assertEquals("cannot find policy: my-name 3", resp.getErrorDetails());
 
         // verify it fails when no authorization info is included
-        checkUnauthRequest(uri, req -> req.delete());
+        checkUnauthRequest(uri, SyncInvoker::delete);
     }
 }
 
 /*
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2019-2021 Nordix Foundation.
+ *  Copyright (C) 2019-2022 Nordix Foundation.
  *  Modifications Copyright (C) 2019 AT&T Intellectual Property.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
 import static org.junit.Assert.assertNotNull;
 
 import java.util.Arrays;
+import java.util.List;
 import javax.ws.rs.client.Entity;
 import javax.ws.rs.client.Invocation;
 import javax.ws.rs.core.MediaType;
 import org.onap.policy.models.pdp.concepts.DeploymentGroups;
 import org.onap.policy.models.pdp.concepts.DeploymentSubGroup;
 import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifierOptVersion;
+import org.springframework.test.context.ActiveProfiles;
 
 /**
  * Note: this tests failure cases; success cases are tested by tests in the "e2e" package.
  */
+@ActiveProfiles("test")
 public class TestPdpGroupDeployControllerV1 extends CommonPapRestServer {
 
     private static final String DEPLOY_GROUP_ENDPOINT = "pdps/deployments/batch";
 
         DeploymentGroup group = new DeploymentGroup();
         group.setName("drools-group");
-        group.setDeploymentSubgroups(Arrays.asList(subgrp));
+        group.setDeploymentSubgroups(List.of(subgrp));
 
         DeploymentGroups groups = new DeploymentGroups();
-        groups.setGroups(Arrays.asList(group));
+        groups.setGroups(List.of(group));
 
         return Entity.entity(groups, MediaType.APPLICATION_JSON);
     }
 
 /*-
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2019 Nordix Foundation.
+ *  Copyright (C) 2019, 2022 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 import static org.junit.Assert.assertNotNull;
 
 import javax.ws.rs.client.Invocation;
+import javax.ws.rs.client.SyncInvoker;
 import javax.ws.rs.core.Response;
 import org.junit.Test;
 import org.onap.policy.models.pdp.concepts.Pdps;
+import org.springframework.test.context.ActiveProfiles;
 
 /**
  * Class to perform unit test of {@link PdpGroupHealthCheckControllerV1}.
  *
  * @author Ram Krishna Verma (ram.krishna.verma@est.tech)
  */
+@ActiveProfiles("test")
 public class TestPdpGroupHealthCheckControllerV1 extends CommonPapRestServer {
 
     private static final String ENDPOINT = "pdps/healthcheck";
         assertNotNull(resp);
 
         // verify it fails when no authorization info is included
-        checkUnauthRequest(uri, req -> req.get());
+        checkUnauthRequest(uri, SyncInvoker::get);
     }
 }
 
 /*-
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2019 Nordix Foundation.
+ *  Copyright (C) 2019, 2022 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 import static org.junit.Assert.assertNotNull;
 
 import javax.ws.rs.client.Invocation;
+import javax.ws.rs.client.SyncInvoker;
 import javax.ws.rs.core.Response;
 import org.junit.Test;
 import org.onap.policy.models.pdp.concepts.PdpGroups;
+import org.springframework.test.context.ActiveProfiles;
 
 /**
  * Class to perform unit test of {@link PdpGroupQueryControllerV1}.
  *
  * @author Ram Krishna Verma (ram.krishna.verma@est.tech)
  */
+@ActiveProfiles("test")
 public class TestPdpGroupQueryControllerV1 extends CommonPapRestServer {
 
     private static final String GROUP_ENDPOINT = "pdps";
     }
 
     @Test
-    public void testchangeGroupState() throws Exception {
+    public void testChangeGroupState() throws Exception {
         final String uri = GROUP_ENDPOINT;
 
         final Invocation.Builder invocationBuilder = sendRequest(uri);
         assertNotNull(resp);
 
         // verify it fails when no authorization info is included
-        checkUnauthRequest(uri, req -> req.get());
+        checkUnauthRequest(uri, SyncInvoker::get);
     }
 }
 
 /*-
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2019 Nordix Foundation.
+ *  Copyright (C) 2019, 2022 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 import javax.ws.rs.core.Response;
 import org.junit.Test;
 import org.onap.policy.models.pap.concepts.PdpGroupStateChangeResponse;
+import org.springframework.test.annotation.DirtiesContext;
+import org.springframework.test.context.ActiveProfiles;
 
 /**
  * Class to perform unit test of {@link PdpGroupStateChangeControllerV1}.
  *
  * @author Ram Krishna Verma (ram.krishna.verma@est.tech)
  */
+@ActiveProfiles("test")
 public class TestPdpGroupStateChangeControllerV1 extends CommonPapRestServer {
 
     private static final String GROUP_ENDPOINT = "pdps/groups";
     }
 
     @Test
-    public void testchangeGroupState() throws Exception {
+    public void testChangeGroupState() throws Exception {
         final String uri = GROUP_ENDPOINT + "/my-name?state=ACTIVE";
 
         final Invocation.Builder invocationBuilder = sendRequest(uri);
 
 /*-
  * ============LICENSE_START=======================================================
  * Copyright (C) 2021 Bell Canada. All rights reserved.
+ * Modifications Copyright (C) 2022 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 import javax.ws.rs.client.Invocation;
 import javax.ws.rs.core.Response;
 import org.junit.Test;
+import org.springframework.test.annotation.DirtiesContext;
+import org.springframework.test.context.ActiveProfiles;
 
 /**
  * Note: this tests failure cases; success cases are tested by tests in the "e2e" package.
  */
+@ActiveProfiles("test")
 public class TestPolicyAuditControllerV1 extends CommonPapRestServer {
 
     private static final String POLICY_AUDIT_ENDPOINT = "policies/audit";
 
 /*-
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2019-2020 Nordix Foundation.
+ *  Copyright (C) 2019-2020, 2022 Nordix Foundation.
  *  Modifications Copyright (C) 2020-2021 AT&T Inc.
  *  Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
  * ================================================================================
 import org.onap.policy.common.endpoints.parameters.RestClientParameters;
 import org.onap.policy.pap.main.parameters.PapParameterGroup;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ActiveProfiles;
 
 /**
  * Class to perform unit test of {@link PolicyComponentsHealthCheckControllerV1}.
  *
  * @author Yehui Wang (yehui.wang@est.tech)
  */
+@ActiveProfiles("test")
 public class TestPolicyComponentsHealthCheckControllerV1 extends CommonPapRestServer {
 
     private static final String ENDPOINT = "components/healthcheck";
 
 /*-
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2020 Nordix Foundation.
+ *  Copyright (C) 2020, 2022 Nordix Foundation.
  *  Modifications Copyright (C) 2020-2021 AT&T Corp.
  *  Modifications Copyright (C) 2020-2022 Bell Canada. All rights reserved.
  * ================================================================================
 import java.io.File;
 import java.net.HttpURLConnection;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 import javax.ws.rs.core.Response;
         ReflectionTestUtils.setField(provider, "papParameterGroup", papParameterGroup);
         provider.initializeClientHealthCheckExecutorService();
         ReflectionTestUtils.setField(provider, "clients", clients);
+        ReflectionTestUtils.setField(provider, "topicPolicyPdpPap", "POLICY-PDP-PAP");
     }
 
     /**
 
     private DmaapGetTopicResponse createDmaapResponse() {
         DmaapGetTopicResponse response = new DmaapGetTopicResponse();
-        response.setTopics(Arrays.asList(PapConstants.TOPIC_POLICY_PDP_PAP));
+        response.setTopics(List.of("POLICY-PDP-PAP"));
         return response;
     }
 }
 
 /*
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2019,2021 Nordix Foundation.
+ *  Copyright (C) 2019, 2021-2022 Nordix Foundation.
  *  Modifications Copyright (C) 2019-2020 AT&T Intellectual Property.
  *  Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
  * ================================================================================
 import static org.junit.Assert.assertEquals;
 
 import javax.ws.rs.client.Invocation;
+import javax.ws.rs.client.SyncInvoker;
 import javax.ws.rs.core.Response;
 import org.junit.Test;
+import org.springframework.test.context.ActiveProfiles;
 
 /**
  * Note: this tests failure cases; success cases are tested by tests in the "e2e" package.
  */
+@ActiveProfiles("test")
 public class TestPolicyStatusControllerV1 extends CommonPapRestServer {
 
     private static final String POLICY_STATUS_ENDPOINT = "policies/deployed";
 
     @Test
     public void testQueryAllDeployedPolicies() throws Exception {
-        String uri = POLICY_STATUS_ENDPOINT;
-
         // verify it fails when no authorization info is included
-        checkUnauthRequest(uri, req -> req.get());
+        checkUnauthRequest(POLICY_STATUS_ENDPOINT, SyncInvoker::get);
         checkRequest(POLICY_STATUS_ENDPOINT);
     }
 
 
     @Test
     public void testGetStatusOfAllPolicies() throws Exception {
-        String uri = POLICY_DEPLOYMENT_STATUS_ENDPOINT;
-
         // verify it fails when no authorization info is included
-        checkUnauthRequest(uri, req -> req.get());
+        checkUnauthRequest(POLICY_DEPLOYMENT_STATUS_ENDPOINT, SyncInvoker::get);
     }
 
     @Test
         assertEquals(Response.Status.NOT_FOUND.getStatusCode(), rawresp.getStatus());
 
         // verify it fails when no authorization info is included
-        checkUnauthRequest(uri, req -> req.get());
+        checkUnauthRequest(uri, SyncInvoker::get);
     }
 
     private void checkInvalidRegexRequest(String uri) throws Exception {
         assertThat(entity).contains("error parsing regexp");
 
         // verify it fails when no authorization info is included
-        checkUnauthRequest(uri, req -> req.get());
+        checkUnauthRequest(uri, SyncInvoker::get);
     }
 
     private void checkEmptyRegexRequest(String uri) throws Exception {
         assertThat(entity).contains("empty string passed as a regex");
 
         // verify it fails when no authorization info is included
-        checkUnauthRequest(uri, req -> req.get());
+        checkUnauthRequest(uri, SyncInvoker::get);
     }
 }
 
 /*
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2019-2020 Nordix Foundation.
+ *  Copyright (C) 2019-2020, 2022 Nordix Foundation.
  *  Modifications Copyright (C) 2019 AT&T Intellectual Property.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
 import org.junit.Test;
 import org.onap.policy.common.utils.services.Registry;
 import org.onap.policy.pap.main.PapConstants;
+import org.springframework.test.annotation.DirtiesContext;
+import org.springframework.test.context.ActiveProfiles;
 
 /**
- * Class to perform unit test of {@link PapRestServer}.
+ * Class to perform unit test of {@link StatisticsRestControllerV1}.
  *
  * @author Ram Krishna Verma (ram.krishna.verma@est.tech)
  */
+@ActiveProfiles("test")
 public class TestStatisticsRestControllerV1 extends CommonPapRestServer {
 
     private static final String STATISTICS_ENDPOINT = "statistics";
 
  * ONAP PAP
  * ================================================================================
  * Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019-2020 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2020, 2022 Nordix Foundation.
  * Modifications Copyright (C) 2021-2022 Bell Canada. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
 import java.util.List;
 import java.util.Map;
 import java.util.Optional;
+import lombok.Getter;
 import org.junit.After;
 import org.onap.policy.common.parameters.ValidationResult;
 import org.onap.policy.common.utils.coder.Coder;
 import org.onap.policy.common.utils.resources.PrometheusUtils;
 import org.onap.policy.common.utils.resources.ResourceUtils;
 import org.onap.policy.models.base.PfConceptKey;
-import org.onap.policy.models.base.PfModelException;
 import org.onap.policy.models.pdp.concepts.PdpGroup;
 import org.onap.policy.models.pdp.concepts.PdpGroups;
 import org.onap.policy.models.pdp.concepts.PdpPolicyStatus;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ActiveProfiles;
 import org.yaml.snakeyaml.Yaml;
 
+@ActiveProfiles("test-e2e")
 public abstract class End2EndBase extends CommonPapRestServer {
     private static final Logger logger = LoggerFactory.getLogger(End2EndBase.class);
 
     @Autowired
     public MeterRegistry meterRegistry;
 
+    @Getter
+    private final String topicPolicyPdpPap = "pdp-pap-topic";
+
+    @Getter
+    private final String topicPolicyNotification = "notification-topic";
+
     public String deploymentsCounterName = "pap_" + PrometheusUtils.POLICY_DEPLOYMENTS_METRIC;
     public String[] deploymentSuccessTag = {PrometheusUtils.OPERATION_METRIC_LABEL, PrometheusUtils.DEPLOY_OPERATION,
         PrometheusUtils.STATUS_METRIC_LABEL, State.SUCCESS.name()};
      * Adds Tosca Policy Types to the DB.
      *
      * @param yamlFile name of the YAML file specifying the data to be loaded
-     * @throws PfModelException if a DAO error occurs
      */
-    public void addToscaPolicyTypes(final String yamlFile) throws PfModelException {
+    public void addToscaPolicyTypes(final String yamlFile) {
         final ToscaServiceTemplate serviceTemplate = loadYamlFile(yamlFile, ToscaServiceTemplate.class);
         JpaToscaServiceTemplate jpaToscaServiceTemplate = mergeWithExistingTemplate(serviceTemplate);
         serviceTemplateRepository.save(jpaToscaServiceTemplate);
      * Adds Tosca Policies to the DB.
      *
      * @param yamlFile name of the YAML file specifying the data to be loaded
-     * @throws PfModelException if a DAO error occurs
      */
-    public void addToscaPolicies(final String yamlFile) throws PfModelException {
+    public void addToscaPolicies(final String yamlFile) {
         final ToscaServiceTemplate serviceTemplate = loadYamlFile(yamlFile, ToscaServiceTemplate.class);
         JpaToscaServiceTemplate jpaToscaServiceTemplate = mergeWithExistingTemplate(serviceTemplate);
         serviceTemplateRepository.save(jpaToscaServiceTemplate);
         JpaToscaServiceTemplate jpaToscaServiceTemplate = new JpaToscaServiceTemplate(serviceTemplate);
         Optional<JpaToscaServiceTemplate> dbServiceTemplateOpt = serviceTemplateRepository
             .findById(new PfConceptKey(JpaToscaServiceTemplate.DEFAULT_NAME, JpaToscaServiceTemplate.DEFAULT_VERSION));
-        if (!dbServiceTemplateOpt.isEmpty()) {
+        if (dbServiceTemplateOpt.isPresent()) {
             JpaToscaServiceTemplate dbServiceTemplate = dbServiceTemplateOpt.get();
             if (dbServiceTemplate.getPolicyTypes() != null) {
                 jpaToscaServiceTemplate.setPolicyTypes(dbServiceTemplate.getPolicyTypes());
      * Adds PDP groups to the DB.
      *
      * @param jsonFile name of the JSON file specifying the data to be loaded
-     * @throws PfModelException if a DAO error occurs
      */
-    public void addGroups(final String jsonFile) throws PfModelException {
+    public void addGroups(final String jsonFile) {
         final PdpGroups groups = loadJsonFile(jsonFile, PdpGroups.class);
 
         final ValidationResult result = groups.validatePapRest();
      * Fetch PDP groups from the DB.
      *
      * @param name name of the pdpGroup
-     * @throws PfModelException if a DAO error occurs
      */
-    public List<PdpGroup> fetchGroups(final String name) throws PfModelException {
+    public List<PdpGroup> fetchGroups(final String name) {
         return pdpGroupService.getPdpGroups(name);
     }
 
      * @param instanceId name of the pdpStatistics
      * @param groupName name of the pdpGroup
      * @param subGroupName name of the pdpSubGroup
-     * @throws PfModelException if a DAO error occurs
      */
     public Map<String, Map<String, List<PdpStatistics>>> fetchPdpStatistics(final String instanceId,
-        final String groupName, final String subGroupName) throws PfModelException {
+        final String groupName, final String subGroupName) {
         return pdpStatisticsService.fetchDatabaseStatistics(groupName, subGroupName, instanceId, 100, null, null);
     }
 
      * Adds PdpPolicyStatus records to the DB.
      *
      * @param jsonFile name of the JSON file specifying the data to be loaded
-     * @throws PfModelException if a DAO error occurs
      */
-    public void addPdpPolicyStatus(final String jsonFile) throws PfModelException {
+    public void addPdpPolicyStatus(final String jsonFile) {
         final PolicyStatusRecords data = loadJsonFile(jsonFile, PolicyStatusRecords.class);
         policyStatusService.cudPolicyStatus(data.records, null, null);
     }
 
  * ONAP PAP
  * ================================================================================
  * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2022 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
      */
     private TopicListener topicListener = (infra, topic, text) -> toPdps.add(text);
 
+    private String topicPolicyPdpPap = "pdp-pap-topic";
 
     /**
      * Constructs the object.
      */
     public End2EndContext() {
-        toPapTopic = TopicEndpointManager.getManager().getNoopTopicSource(PapConstants.TOPIC_POLICY_PDP_PAP);
+        toPapTopic = TopicEndpointManager.getManager().getNoopTopicSource(topicPolicyPdpPap);
 
-        TopicEndpointManager.getManager().getNoopTopicSink(PapConstants.TOPIC_POLICY_PDP_PAP).register(topicListener);
+        TopicEndpointManager.getManager().getNoopTopicSink(topicPolicyPdpPap).register(topicListener);
 
         dispatcher = new MessageTypeDispatcher("messageName");
         dispatcher.register(PdpMessageType.PDP_UPDATE.name(), new UpdateListener());
         toPap.clear();
         pdps.forEach(pdp -> toPap.add(DONE));
 
-        TopicEndpointManager.getManager().getNoopTopicSink(PapConstants.TOPIC_POLICY_PDP_PAP).unregister(topicListener);
+        TopicEndpointManager.getManager().getNoopTopicSink(topicPolicyPdpPap).unregister(topicListener);
     }
 
     /**
                     break;
                 }
 
-                dispatcher.onTopicEvent(CommInfrastructure.NOOP, PapConstants.TOPIC_POLICY_PDP_PAP, text);
+                dispatcher.onTopicEvent(CommInfrastructure.NOOP, topicPolicyPdpPap, text);
             }
         }
     }
      * {@link End2EndContext#DONE} message <i>for each PDP</i>.
      */
     private class ToPapThread extends Thread {
-        /**
-         * Number of DONE messages that have been received.
-         */
-        private long ndone;
 
         @Override
         public void run() {
             // pretend we received DONE from PDPs that are already finished
-            ndone = pdps.stream().filter(pdp -> pdp.finished).count();
+            long ndone = pdps.stream().filter(pdp -> pdp.finished).count();
 
             while (ndone < pdps.size()) {
                 String text;
          *
          * @param reply reply to be added to the list
          * @return this PDP
-         * @throws CoderException if the reply cannot be encoded
          */
-        public PseudoPdp addReply(PdpStatus reply) throws CoderException {
+        public PseudoPdp addReply(PdpStatus reply) {
             replies.add(reply);
             finished = false;
             return this;
 
  * ONAP PAP
  * ================================================================================
  * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2022 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 package org.onap.policy.pap.main.rest.e2e;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 import java.net.HttpURLConnection;
 import javax.ws.rs.client.Invocation;
 
         assertEquals(NAME, report.getName());
         assertEquals(SELF, report.getUrl());
-        assertEquals(true, report.isHealthy());
+        assertTrue(report.isHealthy());
         assertEquals(HttpURLConnection.HTTP_OK, report.getCode());
         assertEquals(ALIVE, report.getMessage());
     }
 
  * ONAP PAP
  * ================================================================================
  * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2021 Nordix Foundation.
+ * Modifications Copyright (C) 2021-2022 Nordix Foundation.
  * Modifications Copyright (C) 2021-2022 Bell Canada. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
 import org.onap.policy.models.pap.concepts.PolicyStatus;
 import org.onap.policy.models.pdp.concepts.PdpStatus;
 import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
-import org.onap.policy.pap.main.PapConstants;
 import org.onap.policy.pap.main.rest.PdpGroupDeployControllerV1;
 
 public class PdpGroupDeleteTest extends End2EndBase {
 
         // arrange to catch notifications
         LinkedBlockingQueue<String> notifications = new LinkedBlockingQueue<>();
-        NoopTopicSink notifier = NoopTopicFactories.getSinkFactory().get(PapConstants.TOPIC_POLICY_NOTIFICATION);
-        notifier.register((infra, topic, msg) -> {
-            notifications.add(msg);
-        });
+        NoopTopicSink notifier = NoopTopicFactories.getSinkFactory().get(getTopicPolicyNotification());
+        notifier.register((infra, topic, msg) -> notifications.add(msg));
 
         String uri = DELETE_POLICIES_ENDPOINT + "/onap.restart.tcaB";
 
 
  * ONAP PAP
  * ================================================================================
  * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2021 Nordix Foundation.
+ * Modifications Copyright (C) 2021-2022 Nordix Foundation.
  * Modifications Copyright (C) 2021-2022 Bell Canada. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
-import java.util.Arrays;
 import java.util.List;
 import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.TimeUnit;
 import org.onap.policy.models.pdp.concepts.PdpStatus;
 import org.onap.policy.models.pdp.enums.PdpState;
 import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
-import org.onap.policy.pap.main.PapConstants;
 import org.onap.policy.pap.main.rest.PdpGroupDeployControllerV1;
 
 public class PdpGroupDeployTest extends End2EndBase {
         status11.setPdpType(DEPLOY_SUBGROUP);
         status11.setPdpSubgroup(DEPLOY_SUBGROUP);
 
-        List<ToscaConceptIdentifier> idents = Arrays.asList(new ToscaConceptIdentifier("onap.restart.tca", "1.0.0"));
+        List<ToscaConceptIdentifier> idents = List.of(new ToscaConceptIdentifier("onap.restart.tca", "1.0.0"));
         status11.setPolicies(idents);
 
         PdpStatus status12 = new PdpStatus();
         status11.setPdpType(DEPLOY_SUBGROUP);
         status11.setPdpSubgroup(DEPLOY_SUBGROUP);
 
-        final ToscaConceptIdentifier ident = new ToscaConceptIdentifier("onap.restart.tcaB", "1.0.0");
+        final ToscaConceptIdentifier identifier = new ToscaConceptIdentifier("onap.restart.tcaB", "1.0.0");
 
-        List<ToscaConceptIdentifier> idents = Arrays.asList(ident);
-        status11.setPolicies(idents);
+        List<ToscaConceptIdentifier> identifiers = List.of(identifier);
+        status11.setPolicies(identifiers);
 
         PdpStatus status12 = new PdpStatus();
         status12.setName("pdpBA_2");
         status12.setPdpGroup("deployPolicies");
         status12.setPdpType(DEPLOY_SUBGROUP);
         status12.setPdpSubgroup(DEPLOY_SUBGROUP);
-        status12.setPolicies(idents);
+        status12.setPolicies(identifiers);
 
         context.addPdp("pdpBA_1", DEPLOY_SUBGROUP).addReply(status11);
         context.addPdp("pdpBA_2", DEPLOY_SUBGROUP).addReply(status12);
 
         // arrange to catch notifications
         LinkedBlockingQueue<String> notifications = new LinkedBlockingQueue<>();
-        NoopTopicSink notifier = NoopTopicFactories.getSinkFactory().get(PapConstants.TOPIC_POLICY_NOTIFICATION);
-        notifier.register((infra, topic, msg) -> {
-            notifications.add(msg);
-        });
+        NoopTopicSink notifier = NoopTopicFactories.getSinkFactory().get(getTopicPolicyNotification());
+        notifier.register((infra, topic, msg) -> notifications.add(msg));
 
-        assertThat(meterRegistry.counter(deploymentsCounterName, deploymentSuccessTag).count()).isEqualTo(0);
+        assertThat(meterRegistry.counter(deploymentsCounterName, deploymentSuccessTag).count()).isZero();
 
         Invocation.Builder invocationBuilder = sendRequest(DEPLOY_POLICIES_ENDPOINT);
 
         assertEquals(2, added.getSuccessCount());
         assertEquals(0, added.getFailureCount());
         assertEquals(0, added.getIncompleteCount());
-        assertEquals(ident, added.getPolicy());
+        assertEquals(identifier, added.getPolicy());
 
         // one of the PDPs should not have handled any requests
         assertEquals(1, context.getPdps().stream().filter(pdp -> pdp.getHandled().isEmpty()).count());
 
  * ================================================================================
  * Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved.
  * Modifications Copyright (C) 2021-2022 Bell Canada. All rights reserved.
+ * Modifications Copyright (C) 2022 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
     @Test
     public void testQueryAllDeployedPolicies() throws Exception {
-        String uri = POLICY_STATUS_ENDPOINT;
-
-        Invocation.Builder invocationBuilder = sendRequest(uri);
+        Invocation.Builder invocationBuilder = sendRequest(POLICY_STATUS_ENDPOINT);
         Response rawresp = invocationBuilder.get();
         assertEquals(Response.Status.OK.getStatusCode(), rawresp.getStatus());
 
-        List<PolicyStatus> resp = rawresp.readEntity(new GenericType<List<PolicyStatus>>() {});
+        List<PolicyStatus> resp = rawresp.readEntity(new GenericType<>() {});
         assertEquals(1, resp.size());
         checkAssertions(resp.get(0));
     }
         Response rawresp = invocationBuilder.get();
         assertEquals(Response.Status.OK.getStatusCode(), rawresp.getStatus());
 
-        List<PolicyStatus> resp = rawresp.readEntity(new GenericType<List<PolicyStatus>>() {});
+        List<PolicyStatus> resp = rawresp.readEntity(new GenericType<>() {});
         assertEquals(1, resp.size());
         checkAssertions(resp.get(0));
     }
 
     @Test
     public void testGetStatusOfAllDeployedPolicies() throws Exception {
-        String uri = POLICY_DEPLOYMENT_STATUS_ENDPOINT;
-
-        Invocation.Builder invocationBuilder = sendRequest(uri);
+        Invocation.Builder invocationBuilder = sendRequest(POLICY_DEPLOYMENT_STATUS_ENDPOINT);
         Response rawresp = invocationBuilder.get();
         assertEquals(Response.Status.OK.getStatusCode(), rawresp.getStatus());
 
-        List<PdpPolicyStatus> resp = rawresp.readEntity(new GenericType<List<PdpPolicyStatus>>() {});
+        List<PdpPolicyStatus> resp = rawresp.readEntity(new GenericType<>() {});
         assertEquals(1, resp.size());
         checkAssertionsForDeploymentStatus(resp.get(0));
     }
         Response rawresp = invocationBuilder.get();
         assertEquals(Response.Status.OK.getStatusCode(), rawresp.getStatus());
 
-        List<PdpPolicyStatus> resp = rawresp.readEntity(new GenericType<List<PdpPolicyStatus>>() {});
+        List<PdpPolicyStatus> resp = rawresp.readEntity(new GenericType<>() {});
         assertEquals(1, resp.size());
         checkAssertionsForDeploymentStatus(resp.get(0));
     }
 
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2022 Bell Canada. All rights reserved.
+ *  Modifications Copyright (C) 2022 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
 import org.onap.policy.pap.main.rest.CommonPapRestServer;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ActiveProfiles;
 
+@ActiveProfiles("test")
 public class PdpGroupServiceTest extends CommonPapRestServer {
 
     private static final String FIELD_IS_NULL = "%s is marked non-null but is null";
         assertThat(activePdpGroups.get(0).getPdpSubgroups()).hasSize(3);
 
         assertThat(pdpGroupService.getPdpGroups(CREATE_GROUPS, PdpState.PASSIVE)).hasSize(1);
-        assertThat(pdpGroupService.getPdpGroups("invalid-group", PdpState.PASSIVE)).hasSize(0);
+        assertThat(pdpGroupService.getPdpGroups("invalid-group", PdpState.PASSIVE)).isEmpty();
         assertThat(pdpGroupService.getPdpGroups(DEFAULT_GROUP, PdpState.ACTIVE)).hasSize(1);
 
         PdpGroupFilter filter = PdpGroupFilter.builder()
 
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2022 Bell Canada. All rights reserved.
+ *  Modifications Copyright (C) 2022 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 import org.onap.policy.pap.main.repository.PdpStatisticsRepository;
 import org.onap.policy.pap.main.rest.CommonPapRestServer;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ActiveProfiles;
 
+@ActiveProfiles("test")
 public class PdpStatisticsServiceTest extends CommonPapRestServer {
 
     private static final String NAME3 = "name3";
     @Before
     public void setUp() throws Exception {
         super.setUp();
-        pdpStatistics1 = generatePdpStatistics(NAME1, TIMESTAMP1, GROUP, SUBGROUP);
-        pdpStatistics2 = generatePdpStatistics("name2", TIMESTAMP1, GROUP, SUBGROUP);
-        pdpStatistics3 = generatePdpStatistics(NAME1, TIMESTAMP2, GROUP, SUBGROUP);
-        pdpStatistics4 = generatePdpStatistics(NAME3, TIMESTAMP2, GROUP0, SUBGROUP);
+        pdpStatistics1 = generatePdpStatistics(NAME1, TIMESTAMP1, GROUP);
+        pdpStatistics2 = generatePdpStatistics("name2", TIMESTAMP1, GROUP);
+        pdpStatistics3 = generatePdpStatistics(NAME1, TIMESTAMP2, GROUP);
+        pdpStatistics4 = generatePdpStatistics(NAME3, TIMESTAMP2, GROUP0);
     }
 
     /**
     @Test
     public void testCreatePdpStatisticsFailure() {
 
-        assertThatThrownBy(() -> {
-            pdpStatisticsService.createPdpStatistics(null);
-        }).hasMessageMatching(LIST_IS_NULL);
+        assertThatThrownBy(() -> pdpStatisticsService.createPdpStatistics(null)).hasMessageMatching(LIST_IS_NULL);
 
         PdpStatistics pdpStatisticsErr = new PdpStatistics();
         pdpStatisticsErr.setPdpInstanceId("NULL");
         pdpStatisticsErr.setPdpGroupName(GROUP);
-        assertThatThrownBy(() -> {
-            pdpStatisticsService.createPdpStatistics(List.of(pdpStatisticsErr));
-        }).hasMessageContaining("item \"name\" value \"NULL\" INVALID, is null");
+        assertThatThrownBy(() -> pdpStatisticsService.createPdpStatistics(List.of(pdpStatisticsErr)))
+            .hasMessageContaining("item \"name\" value \"NULL\" INVALID, is null");
     }
 
     @Test
     public void testFetchDatabaseStatistics() {
-
         List<PdpStatistics> createList = List.of(pdpStatistics1, pdpStatistics3, pdpStatistics4, pdpStatistics2);
         pdpStatisticsService.createPdpStatistics(createList);
-        Map<String, Map<String, List<PdpStatistics>>> created =
-            pdpStatisticsService.fetchDatabaseStatistics(NUMBER_RECORDS, null, null);
-        assertThat(created).hasSize(2);
-        assertThat(created.get(GROUP0)).hasSize(1);
-        assertThat(created.get(GROUP0).get(SUBGROUP)).hasSize(1);
-        assertThat(created.get(GROUP)).hasSize(1);
-        assertThat(created.get(GROUP).get(SUBGROUP)).hasSize(3);
-
-        created = pdpStatisticsService.fetchDatabaseStatistics(NUMBER_RECORDS, TIMESTAMP2, TIMESTAMP2);
-        assertThat(created).hasSize(2);
-        assertThat(created.get(GROUP0)).hasSize(1);
-        assertThat(created.get(GROUP0).get(SUBGROUP)).isEqualTo(List.of(pdpStatistics4));
-        assertThat(created.get(GROUP)).hasSize(1);
-        assertThat(created.get(GROUP).get(SUBGROUP)).isEqualTo(List.of(pdpStatistics3));
-
-        created = pdpStatisticsService.fetchDatabaseStatistics(NUMBER_RECORDS, null, TIMESTAMP1);
-        assertThat(created).hasSize(1);
-        assertThat(created.get(GROUP)).hasSize(1);
-        assertThat(created.get(GROUP).get(SUBGROUP)).hasSize(2);
-
-        created = pdpStatisticsService.fetchDatabaseStatistics(NUMBER_RECORDS, TIMESTAMP2, null);
-        assertThat(created).hasSize(2);
-
-        created = pdpStatisticsService.fetchDatabaseStatistics(GROUP0, NUMBER_RECORDS, TIMESTAMP2, TIMESTAMP2);
-        assertThat(created).hasSize(1);
-        assertThat(created.get(GROUP0)).hasSize(1);
-        assertThat(created.get(GROUP0).get(SUBGROUP)).isEqualTo(List.of(pdpStatistics4));
-
-        created = pdpStatisticsService.fetchDatabaseStatistics(GROUP, NUMBER_RECORDS, null, TIMESTAMP1);
-        assertThat(created).hasSize(1);
-        assertThat(created.get(GROUP)).hasSize(1);
-        assertThat(created.get(GROUP).get(SUBGROUP)).hasSize(2);
-
-        created = pdpStatisticsService.fetchDatabaseStatistics(GROUP, NUMBER_RECORDS, TIMESTAMP2, null);
-        assertThat(created).hasSize(1);
-
-        created = pdpStatisticsService.fetchDatabaseStatistics(GROUP, SUBGROUP, NUMBER_RECORDS, TIMESTAMP1, TIMESTAMP2);
-        assertThat(created).hasSize(1);
-        assertThat(created.get(GROUP)).hasSize(1);
-        assertThat(created.get(GROUP).get(SUBGROUP)).hasSize(3);
-
-        created = pdpStatisticsService.fetchDatabaseStatistics(GROUP, SUBGROUP, NUMBER_RECORDS, null, TIMESTAMP1);
-        assertThat(created).hasSize(1);
-        assertThat(created.get(GROUP)).hasSize(1);
-        assertThat(created.get(GROUP).get(SUBGROUP)).hasSize(2);
-
-        created = pdpStatisticsService.fetchDatabaseStatistics(GROUP, SUBGROUP, NUMBER_RECORDS, TIMESTAMP2, null);
-        assertThat(created).hasSize(1);
-        assertThat(created.get(GROUP).get(SUBGROUP)).isEqualTo(List.of(pdpStatistics3));
-
-        created = pdpStatisticsService.fetchDatabaseStatistics(GROUP, SUBGROUP, NAME1, NUMBER_RECORDS, TIMESTAMP1,
+
+        Map<String, Map<String, List<PdpStatistics>>> statistics;
+
+        statistics = pdpStatisticsService.fetchDatabaseStatistics(NUMBER_RECORDS, null, null);
+        assertGroupAndSubgroupSize(statistics, 2, GROUP0, 1);
+        assertGroupAndSubgroupSize(statistics, 2, GROUP, 3);
+
+        statistics = pdpStatisticsService.fetchDatabaseStatistics(NUMBER_RECORDS, TIMESTAMP2, TIMESTAMP2);
+        assertGroupAndSubgroupSize(statistics, 2, GROUP0, 1);
+        assertThat(statistics.get(GROUP0)).containsEntry(SUBGROUP, List.of(pdpStatistics4));
+        assertGroupAndSubgroupSize(statistics, 2, GROUP, 1);
+        assertThat(statistics.get(GROUP)).containsEntry(SUBGROUP, List.of(pdpStatistics3));
+
+        statistics = pdpStatisticsService.fetchDatabaseStatistics(NUMBER_RECORDS, null, TIMESTAMP1);
+        assertGroupAndSubgroupSize(statistics, 1, GROUP, 2);
+
+        statistics = pdpStatisticsService.fetchDatabaseStatistics(NUMBER_RECORDS, TIMESTAMP2, null);
+        assertThat(statistics).hasSize(2);
+
+        statistics = pdpStatisticsService.fetchDatabaseStatistics(GROUP0, NUMBER_RECORDS, TIMESTAMP2, TIMESTAMP2);
+        assertThat(statistics).hasSize(1);
+        assertThat(statistics.get(GROUP0)).hasSize(1);
+        assertThat(statistics.get(GROUP0)).containsEntry(SUBGROUP, List.of(pdpStatistics4));
+
+        statistics = pdpStatisticsService.fetchDatabaseStatistics(GROUP, NUMBER_RECORDS, null, TIMESTAMP1);
+        assertGroupAndSubgroupSize(statistics, 1, GROUP, 2);
+
+        statistics = pdpStatisticsService.fetchDatabaseStatistics(GROUP, NUMBER_RECORDS, TIMESTAMP2, null);
+        assertThat(statistics).hasSize(1);
+
+        statistics = pdpStatisticsService.fetchDatabaseStatistics(GROUP, SUBGROUP, NUMBER_RECORDS, TIMESTAMP1,
+            TIMESTAMP2);
+        assertGroupAndSubgroupSize(statistics, 1, GROUP, 3);
+
+        statistics = pdpStatisticsService.fetchDatabaseStatistics(GROUP, SUBGROUP, NUMBER_RECORDS, null, TIMESTAMP1);
+        assertGroupAndSubgroupSize(statistics, 1, GROUP, 2);
+
+        statistics = pdpStatisticsService.fetchDatabaseStatistics(GROUP, SUBGROUP, NUMBER_RECORDS, TIMESTAMP2, null);
+        assertThat(statistics).hasSize(1);
+        assertThat(statistics.get(GROUP)).containsEntry(SUBGROUP, List.of(pdpStatistics3));
+
+        statistics = pdpStatisticsService.fetchDatabaseStatistics(GROUP, SUBGROUP, NAME1, NUMBER_RECORDS, TIMESTAMP1,
             TIMESTAMP2);
-        assertThat(created).hasSize(1);
-        assertThat(created.get(GROUP)).hasSize(1);
-        assertThat(created.get(GROUP).get(SUBGROUP)).hasSize(2);
+        assertGroupAndSubgroupSize(statistics, 1, GROUP, 2);
 
-        created =
+        statistics =
             pdpStatisticsService.fetchDatabaseStatistics(GROUP, SUBGROUP, NAME1, NUMBER_RECORDS, null, TIMESTAMP1);
-        assertThat(created).hasSize(1);
-        assertThat(created.get(GROUP)).hasSize(1);
-        assertThat(created.get(GROUP).get(SUBGROUP)).hasSize(1);
+        assertGroupAndSubgroupSize(statistics, 1, GROUP, 1);
 
-        created =
+        statistics =
             pdpStatisticsService.fetchDatabaseStatistics(GROUP0, SUBGROUP, NAME3, NUMBER_RECORDS, TIMESTAMP2, null);
-        assertThat(created).hasSize(1);
-        assertThat(created.get(GROUP0).get(SUBGROUP)).isEqualTo(List.of(pdpStatistics4));
+        assertThat(statistics).hasSize(1);
+        assertThat(statistics.get(GROUP0)).containsEntry(SUBGROUP, List.of(pdpStatistics4));
+    }
+
+    /**
+     * Asserts if statistics list is the expected size and the subgroup list is also the expected size.
+     */
+    private void assertGroupAndSubgroupSize(Map<String, Map<String, List<PdpStatistics>>> statistics, int listSize,
+                                            String group, int subGroupSize) {
+        assertThat(statistics).hasSize(listSize);
+        assertThat(statistics.get(group)).hasSize(1);
+        assertThat(statistics.get(group).get(SUBGROUP)).hasSize(subGroupSize);
     }
 
-    private PdpStatistics generatePdpStatistics(String pdpInstanceId, Instant date, String group,
-        String subgroup) {
+    private PdpStatistics generatePdpStatistics(String pdpInstanceId, Instant date, String group) {
         PdpStatistics pdpStatistics11 = new PdpStatistics();
         pdpStatistics11.setPdpInstanceId(pdpInstanceId);
         pdpStatistics11.setTimeStamp(date);
         pdpStatistics11.setPdpGroupName(group);
-        pdpStatistics11.setPdpSubGroupName(subgroup);
+        pdpStatistics11.setPdpSubGroupName(PdpStatisticsServiceTest.SUBGROUP);
         pdpStatistics11.setPolicyDeployCount(2);
         pdpStatistics11.setPolicyDeployFailCount(1);
         pdpStatistics11.setPolicyDeploySuccessCount(1);
 
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2022 Bell Canada. All rights reserved.
+ *  Modifications Copyright (C) 2022 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 import org.onap.policy.pap.main.repository.PolicyAuditRepository;
 import org.onap.policy.pap.main.rest.CommonPapRestServer;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ActiveProfiles;
 
+@ActiveProfiles("test")
 public class PolicyAuditServiceTest extends CommonPapRestServer {
 
     private static final String FIELD_IS_NULL = "%s is marked .*ull but is null";
             PolicyAudit.builder().pdpType("pdpType").action(AuditAction.DEPLOYMENT).timestamp(Instant.now()).build());
 
         assertThrows(PfModelRuntimeException.class, () -> policyAuditService.createAuditRecords(audits));
-        assertThatThrownBy(() -> {
-            policyAuditService.createAuditRecords(audits);
-        }).isInstanceOf(PfModelRuntimeException.class)
+        assertThatThrownBy(() -> policyAuditService.createAuditRecords(audits))
+            .isInstanceOf(PfModelRuntimeException.class)
             .hasMessageContaining("\"createAuditRecords\" INVALID, item has status INVALID");
 
-        assertThatThrownBy(() -> {
-            policyAuditService.createAuditRecords(null);
-        }).hasMessageMatching(String.format(FIELD_IS_NULL, "audits"));
+        assertThatThrownBy(() -> policyAuditService.createAuditRecords(null))
+            .hasMessageMatching(String.format(FIELD_IS_NULL, "audits"));
     }
 
     @Test
             NUMBER_RECORDS, null, null)).hasSize(2);
         assertThat(
             policyAuditService.getAuditRecords(GROUP_A, MY_POLICY.getName(), "9.9.9", NUMBER_RECORDS, null, null))
-                .hasSize(0);
+                .isEmpty();
         assertThat(policyAuditService.getAuditRecords(GROUP_B, MY_POLICY.getName(), MY_POLICY.getVersion(),
-            NUMBER_RECORDS, null, null)).hasSize(0);
+            NUMBER_RECORDS, null, null)).isEmpty();
         assertThat(policyAuditService.getAuditRecords(GROUP_B, MY_POLICY2.getName(), MY_POLICY2.getVersion(),
             NUMBER_RECORDS, null, null)).hasSize(2);
         assertThat(policyAuditService.getAuditRecords(MY_POLICY2.getName(), MY_POLICY2.getVersion(), NUMBER_RECORDS,
 
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2022 Bell Canada. All rights reserved.
+ *  Modifications Copyright (C) 2022 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifierOptVersion;
 import org.onap.policy.pap.main.rest.CommonPapRestServer;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ActiveProfiles;
 
+@ActiveProfiles("test")
 public class PolicyStatusServiceTest extends CommonPapRestServer {
 
     private static final String GROUP_A = "groupA";
 
 /*-
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2019 Nordix Foundation.
+ *  Copyright (C) 2019, 2022 Nordix Foundation.
  *  Modifications Copyright (C) 2019, 2021 AT&T Intellectual Property.
  *  Modifications Copyright (C) 2021-2022 Bell Canada. All rights reserved.
  * ================================================================================
 import java.io.FileOutputStream;
 import java.nio.charset.StandardCharsets;
 import org.junit.After;
+import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
+import org.onap.policy.common.endpoints.event.comm.TopicEndpointManager;
 import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
 import org.onap.policy.common.utils.network.NetworkUtil;
 import org.onap.policy.common.utils.services.Registry;
 import org.onap.policy.pap.main.PapConstants;
-import org.onap.policy.pap.main.PolicyPapException;
 import org.onap.policy.pap.main.comm.PdpHeartbeatListener;
 import org.onap.policy.pap.main.comm.PdpModifyRequestMap;
 import org.onap.policy.pap.main.notification.PolicyNotifier;
 public class TestPapActivator {
     private static final String CONFIG_FILE = "src/test/resources/parameters/TestConfigParams.json";
 
-    private static int port;
-
     private PapActivator activator;
 
     /**
      * Allocates a new DB name, server port, and creates a config file.
      */
     @BeforeClass
-    public static void setUpBeforeClass() throws Exception {
+    public static void setUpBeforeClass() {
         CommonTestData.newDb();
     }
 
     @Before
     public void setUp() throws Exception {
         Registry.newRegistry();
+        TopicEndpointManager.getManager().shutdown();
         HttpServletServerFactoryInstance.getServerFactory().destroy();
 
-        port = NetworkUtil.allocPort();
+        int port = NetworkUtil.allocPort();
 
         String json = new CommonTestData().getPapParameterGroupAsString(port);
 
         }
     }
 
+    @AfterClass
+    public static void afterClass() {
+        Registry.newRegistry();
+    }
+
     @Test
-    public void testPapActivator() throws PolicyPapException {
+    public void testPapActivator() {
         assertFalse(activator.isAlive());
         activator.start();
         assertTrue(activator.isAlive());
     }
 
     @Test
-    public void testTerminate() throws Exception {
+    public void testTerminate() {
         activator.start();
         activator.stop();
         assertFalse(activator.isAlive());
 
--- /dev/null
+spring:
+  security:
+    user:
+      name: policyadmin
+      password: zb!XztG34
+  http:
+    converters:
+      preferred-json-mapper: gson
+  datasource:
+    url: jdbc:h2:mem:testdb
+    driverClassName: org.h2.Driver
+  jpa:
+    properties:
+      hibernate:
+        dialect: org.hibernate.dialect.H2Dialect
+    hibernate:
+      ddl-auto: create-drop
+      naming:
+        physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
+        implicit-strategy: org.onap.policy.common.spring.utils.CustomImplicitNamingStrategy
+
+server:
+  port: 6969
+
+pap:
+  name: "PapGroupE2E"
+  aaf: false
+  topic:
+    pdp-pap.name: pdp-pap-topic
+    notification.name: notification-topic
+    heartbeat.name: heartbeat-topic
+  pdpParameters:
+    updateParameters:
+      maxRetryCount: 1
+      maxWaitMs: 3000
+    stateChangeParameters:
+      maxRetryCount: 1
+      maxWaitMs: 3000
+    heartBeatMs: 6000
+    maxMessageAgeMs: 20000
+  savePdpStatisticsInDb: true
+  topicParameterGroup:
+    topicSources:
+    - topic: ${pap.topic.pdp-pap.name}
+      servers:
+        - message-router
+      topicCommInfrastructure: noop
+    - topic: ${pap.topic.heartbeat.name}
+      effectiveTopic: ${pap.topic.pdp-pap.name}
+      consumerGroup: policy-pap
+      servers:
+        - message-router
+      topicCommInfrastructure: noop
+    topicSinks:
+    - topic: ${pap.topic.pdp-pap.name}
+      servers:
+        - message-router
+      topicCommInfrastructure: noop
+    - topic: ${pap.topic.notification.name}
+      servers:
+        - message-router
+      topicCommInfrastructure: noop
+  healthCheckRestClientParameters:
+  - clientName: api
+    hostname: policy-api
+    port: 6969
+    userName: policyadmin
+    password: zb!XztG34
+    useHttps: true
+    basePath: policy/api/v1/healthcheck
+  - clientName: distribution
+    hostname: policy-distribution
+    port: 6969
+    userName: healthcheck
+    password: zb!XztG34
+    useHttps: true
+    basePath: healthcheck
+  - clientName: dmaap
+    hostname: message-router
+    port: 3905
+    useHttps: true
+    basePath: topics
+
+management:
+  endpoints:
+    web:
+      base-path: /
+      exposure:
+        include: health, metrics, prometheus
+      path-mapping.prometheus: metrics
 
       hibernate:
         dialect: org.hibernate.dialect.H2Dialect
     hibernate:
-      ddl-auto: update
+      ddl-auto: create-drop
       naming:
         physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
         implicit-strategy: org.onap.policy.common.spring.utils.CustomImplicitNamingStrategy
 pap:
   name: "PapGroup"
   aaf: false
+  topic:
+    pdp-pap.name: POLICY-PDP-PAP
+    notification.name: POLICY-NOTIFICATION
+    heartbeat.name: POLICY-HEARTBEAT
   pdpParameters:
     updateParameters:
       maxRetryCount: 1
   savePdpStatisticsInDb: true
   topicParameterGroup:
     topicSources:
-    - topic: POLICY-PDP-PAP
+    - topic: ${pap.topic.pdp-pap.name}
       servers:
       - message-router
       topicCommInfrastructure: noop
-    - topic: POLICY-HEARTBEAT
-      effectiveTopic: POLICY-PDP-PAP
+    - topic: ${pap.topic.heartbeat.name}
+      effectiveTopic: ${pap.topic.pdp-pap.name}
       consumerGroup: policy-pap
       servers:
       - message-router
       topicCommInfrastructure: noop
     topicSinks:
-    - topic: POLICY-PDP-PAP
+    - topic: ${pap.topic.pdp-pap.name}
       servers:
       - message-router
       topicCommInfrastructure: noop
-    - topic: POLICY-NOTIFICATION
+    - topic: ${pap.topic.notification.name}
       servers:
       - message-router
       topicCommInfrastructure: noop
 
 {
-    "name": "PapGroup",
+    "name": "PapGroupE2E",
     "restServerParameters": {
         "host": "0.0.0.0",
         "port": ${port},
     },
     "topicParameterGroup": {
         "topicSources" : [{
-            "topic" : "POLICY-PDP-PAP",
+            "topic" : "pdp-pap-topic",
             "servers" : [ "message-router" ],
             "topicCommInfrastructure" : "noop"
         },
         {
-            "topic" : "POLICY-HEARTBEAT",
+            "topic" : "heartbeat-topic",
             "effectiveTopic": "POLICY-PDP-PAP",
             "consumerGroup": "policy-pap",
             "servers" : [ "message-router" ],
             "topicCommInfrastructure" : "noop"
         }],
         "topicSinks" : [{
-            "topic" : "POLICY-PDP-PAP",
+            "topic" : "pdp-pap-topic",
             "servers" : [ "message-router" ],
             "topicCommInfrastructure" : "noop"
         },{
-            "topic" : "POLICY-NOTIFICATION",
+            "topic" : "notification-topic",
             "servers" : [ "message-router" ],
             "topicCommInfrastructure" : "noop"
         }]