BasicWindowTransition implements WindowTransition { @Override public void overrideFinish(@NonNull final Activity activity) { activity.overridePendingTransition(finishEnterAnimRes, finishExitAnimRes); } BasicWindowTransition(@AnimRes final int enterAnim, @AnimRes final int exitAnim);  BasicWindowTransition(
			@AnimRes final int startEnterAnim,
			@AnimRes final int startExitAnim,
			@AnimRes final int finishEnterAnim,
			@AnimRes final int finishExitAnim
	);  BasicWindowTransition(
			@AnimRes final int startEnterAnim,
			@AnimRes final int startExitAnim,
			@AnimRes final int finishEnterAnim,
			@AnimRes final int finishExitAnim,
			@NonNull final String name
	); protected  BasicWindowTransition(@NonNull final Parcel source); @Override void writeToParcel(@NonNull final Parcel dest, final int flags); @Override int describeContents(); @Override @AnimRes int getStartEnterAnimation(); @Override @AnimRes int getStartExitAnimation(); @Override @AnimRes int getFinishEnterAnimation(); @Override @AnimRes int getFinishExitAnimation(); @Override @NonNull String getName(); @Override void overrideStart(@NonNull final Activity activity); @Override void overrideFinish(@NonNull final Activity activity); static final Creator<BasicWindowTransition> CREATOR; }
@Test public void testOverrideFinish() { final Activity mockActivity = mock(TestActivity.class); final int startEnterAnimation = android.R.anim.fade_in; final int startExitAnimation = android.R.anim.fade_out; final int finishEnterAnimation = android.R.anim.slide_in_left; final int finishExitAnimation = android.R.anim.slide_out_right; final BasicWindowTransition transition = new BasicWindowTransition(startEnterAnimation, startExitAnimation, finishEnterAnimation, finishExitAnimation); transition.overrideFinish(mockActivity); verify(mockActivity).overridePendingTransition(finishEnterAnimation, finishExitAnimation); verifyNoMoreInteractions(mockActivity); }
@Test public void testOverrideFinishSimple() { final Activity mockActivity = mock(TestActivity.class); final int enterAnimation = android.R.anim.fade_in; final int exitAnimation = android.R.anim.fade_out; final BasicWindowTransition transition = new BasicWindowTransition(enterAnimation, exitAnimation); transition.overrideFinish(mockActivity); verify(mockActivity).overridePendingTransition(BasicWindowTransition.NO_ANIMATION, BasicWindowTransition.NO_ANIMATION); verifyNoMoreInteractions(mockActivity); }