BaseIntent { @SuppressWarnings("unchecked") public I transitions(@AnimRes final int enterTransition, @AnimRes final int exitTransition) { this.enterTransition = enterTransition; this.exitTransition = exitTransition; this.applyTransitions = enterTransition != 0 || exitTransition != 0; return (I) this; }  @SuppressWarnings("unchecked") I dialogTitle(@Nullable final CharSequence title); @NonNull CharSequence dialogTitle(); @SuppressWarnings("unchecked") I activityNotFoundMessage(@Nullable final CharSequence message); @NonNull CharSequence activityNotFoundMessage(); I enterTransition(@AnimRes final int transition); @AnimRes int enterTransition(); I exitTransition(@AnimRes final int transition); @AnimRes int exitTransition(); @SuppressWarnings("unchecked") I transitions(@AnimRes final int enterTransition, @AnimRes final int exitTransition); boolean startWith(@NonNull final IntentStarter starter); @NonNull Intent build(@NonNull final Context context); @CheckResult static boolean isActivityForIntentAvailable(@NonNull final Context context, @NonNull final Intent intent);  }
@Test public void testTransitions() { final BaseIntent intent = new IntentImpl(); final int enterAnimationResource = android.R.anim.fade_in; final int exitAnimationResource = android.R.anim.fade_out; intent.transitions(enterAnimationResource, exitAnimationResource); assertThat(intent.enterTransition(), is(enterAnimationResource)); assertThat(intent.exitTransition(), is(exitAnimationResource)); }