ActivityDelegate extends MvvmDelegate<T, S> { @Override protected boolean isFinished() { return !delegatedActivity.isChangingConfigurations(); } ActivityDelegate(@NonNull ActivityDelegateCallback<T, S> callback, @NonNull Activity delegatedActivity); @Nullable Object onRetainCustomNonConfigurationInstance();  }
@Test public void testDelegateToActivityFinishingCheck() { when(activity.isChangingConfigurations()).thenReturn(false).thenReturn(true); assertTrue(activityDelegate.isFinished()); assertFalse(activityDelegate.isFinished()); }