X-Git-Url: https://gerrit.onap.org/r/gitweb?p=policy%2Fengine.git;a=blobdiff_plain;f=ONAP-PAP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fpap%2Fxacml%2Frest%2Fservice%2FMetricService.java;h=36dd5fdee8bdd48a52b6099e98f7c954278d61b0;hp=0a539dcbbecfa099903c65726e5d451f1ea86806;hb=0154925df97446afa15ab60d59c57237dfa7b2e9;hpb=2903daf20f5e473a96a36342151a26e9f2e55005 diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/service/MetricService.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/service/MetricService.java index 0a539dcbb..36dd5fdee 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/service/MetricService.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/service/MetricService.java @@ -21,6 +21,7 @@ package org.onap.policy.pap.xacml.rest.service; import com.att.research.xacml.api.pap.PDPPolicy; +import com.google.common.annotations.VisibleForTesting; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -48,8 +49,9 @@ public class MetricService { } + @VisibleForTesting @Autowired - private MetricService(CommonClassDao commonClassDao) { + protected MetricService(CommonClassDao commonClassDao) { MetricService.commonClassDao = commonClassDao; } @@ -76,7 +78,7 @@ public class MetricService { json.put("totalCount", totalCount); if (pdpCount > 0 && papCount > 0 && totalCount > 0) { PolicyLogger.info( - "Metrics have been found on the Policy Engine for the number of policies on the PAP and PDP."); + "Metrics have been found on the Policy Engine for the number of policies on the PAP and PDP."); response.setStatus(HttpServletResponse.SC_OK); response.addHeader("successMapKey", "success"); response.addHeader("operation", "getMetrics"); @@ -84,7 +86,7 @@ public class MetricService { return; } else { String message = - "The policy count on the PAP and PDP is 0. Please check the database and file system to correct this error."; + "The policy count on the PAP and PDP is 0. Please check the database and file system to correct this error."; response.setStatus(HttpServletResponse.SC_BAD_REQUEST); response.addHeader(errorMsg, message); return;