PolicyManagerServiceImpl implements PolicyManagerService { @Override public Policy updatePolicy(Policy policy) throws PolicyManagementException { return policyAdministratorPoint.updatePolicy(policy); } PolicyManagerServiceImpl(); @Override Profile addProfile(Profile profile); @Override Profile updateProfile(Profile profile); @Override Policy addPolicy(Policy policy); @Override Policy updatePolicy(Policy policy); @Override boolean deletePolicy(Policy policy); @Override boolean deletePolicy(int policyId); @Override Policy getEffectivePolicy(DeviceIdentifier deviceIdentifier); @Override List<ProfileFeature> getEffectiveFeatures(DeviceIdentifier deviceIdentifier); @Override List<Policy> getPolicies(String deviceType); @Override List<Feature> getFeatures(); @Override PolicyAdministratorPoint getPAP(); @Override PolicyInformationPoint getPIP(); @Override PolicyEvaluationPoint getPEP(); @Override TaskScheduleService getTaskScheduleService(); @Override int getPolicyCount(); @Override Policy getAppliedPolicyToDevice(
            DeviceIdentifier deviceIdentifier); @Override List<ComplianceFeature> checkPolicyCompliance(DeviceIdentifier deviceIdentifier, Object
            deviceResponse); @Override boolean checkCompliance(DeviceIdentifier deviceIdentifier, Object response); @Override NonComplianceData getDeviceCompliance(DeviceIdentifier deviceIdentifier); @Override boolean isCompliant(DeviceIdentifier deviceIdentifier);  }
@Test(dependsOnMethods = "inactivatePolicy") public void updatePolicy() throws PolicyManagementException { Policy policy1Temp = policyManagerService.getPAP().getPolicy(policy1.getId()); policy1Temp.setDescription("Updated policy1"); policy1Temp = policyManagerService.updatePolicy(policy1Temp); Policy policy1Updated = policyManagerService.getPAP().getPolicy(policy1.getId()); Assert.assertEquals(policy1Updated.getDescription(), policy1Temp.getDescription(), "Policy was not updated successfully."); }