@Test(description = "This test case tests handling ProfileManagerDAOException when adding new profile feature",
      dependsOnMethods = "testUpdateProfileFeaturesThrowingFeatureManagementException")
public void testUpdateProfileFeaturesThrowingProfileManagerDAOException() throws Exception {

    Profile profile = ProfileCreator.getProfile(FeatureCreator.getFeatureList(), DEVICE_TYPE_D);
    profile1 = profileManager.addProfile(profile);
    ProfileDAO profileDAO = mock(ProfileDAO.class);
    when(profileDAO.getProfile(anyInt())).thenThrow(new ProfileManagerDAOException());
    List<ProfileFeature> profileFeaturesList = profile.getProfileFeaturesList();
    testThrowingException(featureManager,
                          profileFeaturesList,
                          p -> featureManager
                                  .updateProfileFeatures((List<ProfileFeature>) p, profile1.getProfileId()),
                          "profileDAO", profileDAO,
                          ProfileManagerDAOException.class);
}