Removed db-based statistics feature
[policy/pap.git] / main / src / test / java / org / onap / policy / pap / main / rest / TestPdpGroupDeployProvider.java
index 29c06f7..b828509 100644 (file)
@@ -4,7 +4,7 @@
  * ================================================================================
  * Copyright (C) 2019-2022 AT&T Intellectual Property. All rights reserved.
  * Modifications Copyright (C) 2021 Nordix Foundation.
- * Modifications Copyright (C) 2021-2022 Bell Canada. All rights reserved.
+ * Modifications Copyright (C) 2021-2023 Bell Canada. 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.
@@ -54,12 +54,10 @@ import org.onap.policy.models.pdp.concepts.PdpSubGroup;
 import org.onap.policy.models.pdp.concepts.PdpUpdate;
 import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
 import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy;
-import org.onap.policy.pap.main.PapConstants;
 
 public class TestPdpGroupDeployProvider extends ProviderSuper {
 
     private static final String EXPECTED_EXCEPTION = "expected exception";
-
     private static final String POLICY2_NAME = "policyB";
     private static final String POLICY3_NAME = "policyC";
     private static final String POLICY1_VERSION = "1.2.3";
@@ -568,25 +566,6 @@ public class TestPdpGroupDeployProvider extends ProviderSuper {
                 .hasMessage("policy not supported by any PDP group: policyA 1.2.3");
     }
 
-    /**
-     * Tests PapStatisticsManager counts when policies are added to a subgroup.
-     *
-     * @throws Exception if an error occurs
-     */
-    @Test
-    public void testDeployedPdpGroupCountStatistics() throws Exception {
-        Registry.unregister(PapConstants.REG_STATISTICS_MANAGER);
-        PapStatisticsManager mgr = new PapStatisticsManager();
-        Registry.register(PapConstants.REG_STATISTICS_MANAGER, mgr);
-
-        when(pdpGroupService.getFilteredPdpGroups(any())).thenReturn(loadGroups("deployPoliciesWildCard.json"));
-        prov.deployPolicies(loadRequest("multiple_requests.json"), DEFAULT_USER);
-        assertEquals(3, mgr.getTotalPolicyDeployCount());
-
-        Registry.unregister(PapConstants.REG_STATISTICS_MANAGER);
-        Registry.register(PapConstants.REG_STATISTICS_MANAGER, statsmanager);
-    }
-
     @Test
     public void testMakeUpdater() throws Exception {
         /*