@Test
public void testNotDestroyViewModelOnConfigurationChange() {

    activityDelegate.viewModel = viewModel;
    when(activity.isChangingConfigurations()).thenReturn(true);
    activityDelegate.onRetainCustomNonConfigurationInstance();
    verify(viewModel, never()).onDestroy();
}