@Test(dependsOnMethods = "applyPolicy")
public void checkCompliance() throws PolicyComplianceException, DeviceManagementException {

    new MonitoringTask().execute();
    List<ComplianceFeature> complianceFeatures = new ArrayList<>();
    ComplianceFeature complianceFeature = new ComplianceFeature();
    ProfileFeature profileFeature = new ProfileFeature();
    profileFeature.setContent("{'enable':'false'}");
    profileFeature.setDeviceType(DEVICE_TYPE_A);
    profileFeature.setFeatureCode(POLICY1_FEATURE1_CODE);
    complianceFeature.setFeature(profileFeature);
    complianceFeature.setFeatureCode(profileFeature.getFeatureCode());
    complianceFeature.setMessage("Test message");
    complianceFeature.setCompliance(true);
    complianceFeatures.add(complianceFeature);
    Device device = DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().
            getDevice(new DeviceIdentifier(DEVICE1, DEVICE_TYPE_A), false);
    List<Device> deviceList = new ArrayList<>();
    deviceList.add(device);
    MonitoringManager manager = new MonitoringManagerImpl();
    manager.addMonitoringOperation(deviceList);
    policyManagerService.checkCompliance(new DeviceIdentifier(DEVICE1, DEVICE_TYPE_A), complianceFeatures);
    boolean deviceCompliance = policyManagerService.isCompliant(new DeviceIdentifier(DEVICE1, DEVICE_TYPE_A));
    Assert.assertTrue(deviceCompliance, "Policy was not compliant");
}