@Test(description = "This test case tests handling ProfileManagerDAOException when deleting a profile",
      dependsOnMethods = "testGetProfilesOfDeviceTypeThrowingIllegalTransactionStateException")
public void testDeleteProfileThrowingProfileManagerDAOException() throws Exception {

    ProfileDAO profileDAO = mock(ProfileDAOImpl.class);
    when(profileDAO.deleteProfile(any(Profile.class))).thenThrow(new ProfileManagerDAOException());
    testThrowingException(profileManager, profile1, p -> profileManager.deleteProfile(profile1), "profileDAO",
                          profileDAO,
                          ProfileManagerDAOException.class);
}