FragmentRequest { public FragmentRequest reenterTransition(@Nullable final Object transition) { this.specifiedTransitions |= TRANSITION_REENTER; this.reenterTransition = transition; return this; } FragmentRequest(final FragmentController controller, int fragmentId);   FragmentRequest(final FragmentController controller, final Fragment fragment); @SuppressWarnings("StringBufferReplaceableByString") @Override String toString(); @NonNull Fragment fragment(); FragmentRequest fragmentId(final int fragmentId); int fragmentId(); FragmentRequest outgoingFragmentId(final int fragmentId); int outgoingFragmentId(); FragmentRequest arguments(@Nullable final Bundle arguments); @Nullable Bundle arguments(); FragmentRequest transaction(@Transaction final int transaction); @Transaction int transaction(); FragmentRequest tag(@Nullable final String fragmentTag); @Nullable String tag(); FragmentRequest viewContainerId(@IdRes final int containerId); @IdRes int viewContainerId(); FragmentRequest transition(@Nullable final FragmentTransition transition); @Nullable FragmentTransition transition(); FragmentRequest transitionStyle(@StyleRes final int transitionStyle); @StyleRes int transitionStyle(); FragmentRequest enterTransition(@Nullable final Object transition); @Nullable Object enterTransition(); FragmentRequest exitTransition(@Nullable final Object transition); @Nullable Object exitTransition(); FragmentRequest reenterTransition(@Nullable final Object transition); @Nullable Object reenterTransition(); FragmentRequest returnTransition(@Nullable final Object transition); @Nullable Object returnTransition(); FragmentRequest allowEnterTransitionOverlap(final boolean allowOverlap); Boolean allowEnterTransitionOverlap(); FragmentRequest allowReturnTransitionOverlap(final boolean allowOverlap); Boolean allowReturnTransitionOverlap(); @SafeVarargs final FragmentRequest sharedElements(@NonNull final Pair<View, String>... elements); FragmentRequest sharedElement(@NonNull final View element, @NonNull final String elementName); @Nullable List<Pair<View, String>> sharedElements(); @Nullable Pair<View, String> singleSharedElement(); FragmentRequest sharedElementEnterTransition(@Nullable final Object transition); @Nullable Object sharedElementEnterTransition(); FragmentRequest sharedElementReturnTransition(@Nullable final Object transition); @Nullable Object sharedElementReturnTransition(); FragmentRequest replaceSame(final boolean replace); boolean replaceSame(); FragmentRequest addToBackStack(final boolean add); boolean addToBackStack(); FragmentRequest allowStateLoss(final boolean allow); boolean allowStateLoss(); FragmentRequest immediate(final boolean immediate); boolean immediate(); @Nullable Fragment execute(); boolean executed(); static final int NO_ID; static final int NO_STYLE; static final int REPLACE; static final int ADD; static final int REMOVE; static final int SHOW; static final int HIDE; static final int ATTACH; static final int DETACH; }
@Config(sdk = {Build.VERSION_CODES.JELLY_BEAN, Build.VERSION_CODES.LOLLIPOP}) @Test public void testReenterTransition() { final Object transition = createTestTransition(); final FragmentRequest request = new FragmentRequest(mock(FragmentController.class), FragmentRequest.NO_ID); assertThat(request.reenterTransition(transition), is(request)); assertThat(request.reenterTransition(), is(transition)); assertThat(request.hasTransition(FragmentRequest.TRANSITION_REENTER), is(true)); }