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

    Profile profile = ProfileCreator.getProfile(FeatureCreator.getFeatureList(), DEVICE_TYPE_D);
    profile1 = profileManager.addProfile(profile);
    FeatureDAO featureDAO = mock(FeatureDAO.class);
    when(featureDAO.deleteFeaturesOfProfile(any(Profile.class))).thenThrow(new FeatureManagerDAOException());
    testThrowingException(featureManager,
                          profile1,
                          p -> featureManager.deleteFeaturesOfProfile(profile),
                          "featureDAO", featureDAO,
                          FeatureManagerDAOException.class);
}