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

    Profile profile = ProfileCreator.getProfile(FeatureCreator.getFeatureList(), DEVICE_TYPE_D);
    profile1 = profileManager.addProfile(profile);
    FeatureDAO featureDAO = mock(FeatureDAO.class);
    when(featureDAO.updateProfileFeature(any(ProfileFeature.class), anyInt())).thenThrow(
            new FeatureManagerDAOException());
    ProfileFeature profileFeature = profile.getProfileFeaturesList().get(0);
    testThrowingException(featureManager,
                          profileFeature,
                          p -> featureManager.updateProfileFeature((ProfileFeature) p, profile1.getProfileId()),
                          "featureDAO", featureDAO,
                          FeatureManagerDAOException.class);
}