PolicyManagerServiceImpl implements PolicyManagerService { @Override public Profile updateProfile(Profile profile) throws PolicyManagementException { return policyAdministratorPoint.updateProfile(profile); } 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 = "addProfile") public void updateProfile() throws Exception{ Policy effectivePolicy = policyManagerService.getEffectivePolicy(new DeviceIdentifier(DEVICE1, DEVICE_TYPE_A)); Profile currentProfile = effectivePolicy.getProfile(); List<ProfileFeature> profileFeatures = new ArrayList<>(); ProfileFeature profileFeature = new ProfileFeature(); profileFeature.setContent("{'enable':'true'}"); profileFeature.setDeviceType(DEVICE_TYPE_A); profileFeature.setFeatureCode(POLICY1_CAM_FEATURE1_CODE); profileFeatures.add(profileFeature); profile.setProfileFeaturesList(profileFeatures); profile.setUpdatedDate(new Timestamp(System.currentTimeMillis())); Profile updatedProfile = policyManagerService.updateProfile(this.profile); Assert.assertNotNull(profile); Assert.assertNotNull(currentProfile.getProfileFeaturesList().get(0).getFeatureCode(), updatedProfile.getProfileFeaturesList().get(0).getFeatureCode()); }