BRMSParamPolicyService { public String getResult(boolean updateFlag) throws PolicyException { String response = null; String operation = null; if (updateFlag) { operation = "update"; } else { operation = "create"; } StdPAPPolicy newPAPPolicy = new StdPAPPolicy(StdPAPPolicyParams.builder() .configPolicyType("BRMS_Param") .policyName(policyName) .description(policyParameters.getPolicyDescription()) .configName("BRMS_PARAM_RULE") .editPolicy(updateFlag) .domain(policyScope) .dynamicFieldConfigAttributes(drlRuleAndUIParams.get(AttributeType.MATCHING)) .highestVersion(0) .onapName("DROOLS") .configBodyData(null) .drlRuleAndUIParams(drlRuleAndUIParams.get(AttributeType.RULE)) .riskLevel(policyParameters.getRiskLevel()) .riskType(policyParameters.getRiskType()) .guard(String.valueOf(policyParameters.getGuard())) .ttlDate(date) .brmsController(policyParameters.getControllerName()) .brmsDependency(policyParameters.getDependencyNames()) .build()); response = (String) papServices.callPAP(newPAPPolicy, new String[]{"operation=" + operation, "apiflag=api", "policyType=Config"}, policyParameters.getRequestID(), "ConfigBrmsParam"); LOGGER.info(response); return response; } BRMSParamPolicyService(String policyName, String policyScope,
                                  PolicyParameters policyParameters, String date); Boolean getValidation(); String getMessage(); String getResult(boolean updateFlag);  }
@Test public final void testGetResult() throws PolicyException { service.getValidation(); String result = service.getResult(false); assertEquals("success", result); }