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

    FeatureDAO featureDAO = mock(FeatureDAO.class);
    when(featureDAO.deleteFeaturesOfProfile(any(Profile.class))).thenThrow(new FeatureManagerDAOException());
    testThrowingException(profileManager, profile1, p -> profileManager.deleteProfile(profile1), "featureDAO",
                          featureDAO,
                          FeatureManagerDAOException.class);
}