@Test(description = "This test case tests handling ProfileManagerDAOException when checking policy compliance",
      dependsOnMethods = "testCheckPolicyCompliance")
public void testCheckPolicyComplianceThrowingProfileManagerDAOException() throws Exception {

    MonitoringDAO monitoringDAO = mock(MonitoringDAO.class);
    when(monitoringDAO.getCompliance(anyInt(),anyInt())).thenThrow(new MonitoringDAOException());
    DeviceIdentifier deviceIdentifier = new DeviceIdentifier();
    deviceIdentifier.setType(DEVICE_TYPE_E);
    deviceIdentifier.setId(String.valueOf(device5.getDeviceIdentifier()));
    testThrowingException(monitoringManager,
                          null,
                          p -> monitoringManager.checkPolicyCompliance(deviceIdentifier, new ArrayList<ComplianceFeature>()),
                          "monitoringDAO", monitoringDAO,
                          MonitoringDAOException.class);
}