### Question:
DetailsFragment extends BaseFragment { public RowsFragment getRowsFragment() { return mRowsFragment; }  void setAdapter(ObjectAdapter adapter); ObjectAdapter getAdapter(); void setOnItemViewSelectedListener(BaseOnItemViewSelectedListener listener); void setOnItemViewClickedListener(BaseOnItemViewClickedListener listener); BaseOnItemViewClickedListener getOnItemViewClickedListener(); @Override void onCreate(Bundle savedInstanceState); @Override View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState); @Override View onInflateTitleView(LayoutInflater inflater, ViewGroup parent,
                                   Bundle savedInstanceState); RowsFragment getRowsFragment(); void setSelectedPosition(int position); void setSelectedPosition(int position, boolean smooth); @Override void onStop(); @Override void onStart(); DetailsParallax getParallax();  }### Answer:
@Test public void switchToVideoBackToQuit() { final SingleFragmentTestActivity activity = launchAndWaitActivity(DetailsFragmentSwitchToVideoInOnCreate.class, new Options().uiVisibility( View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN), 0); final DetailsFragmentSwitchToVideoInOnCreate detailsFragment = (DetailsFragmentSwitchToVideoInOnCreate) activity.getTestFragment(); assertEquals(StateMachine.STATUS_INVOKED, detailsFragment.STATE_ENTER_TRANSITION_COMPLETE.getStatus()); assertNull(TransitionHelper.getEnterTransition(activity.getWindow())); assertEquals(0, getCoverDrawableAlpha(detailsFragment.mDetailsBackgroundController)); assertTrue(detailsFragment.getRowsFragment().getView().hasFocus()); assertFalse(detailsFragment.isShowingTitle()); SystemClock.sleep(1000); assertNull(detailsFragment.mVideoFragment); InstrumentationRegistry.getInstrumentation().runOnMainSync( new Runnable() { @Override public void run() { final MediaPlayerGlue glue = new MediaPlayerGlue(activity); detailsFragment.mDetailsBackgroundController.setupVideoPlayback(glue); glue.setMode(MediaPlayerGlue.REPEAT_ALL); glue.setArtist("A Googleer"); glue.setTitle("Diving with Sharks"); glue.setMediaSource(Uri.parse( "android.resource: } } ); PollingCheck.waitFor(4000, new PollingCheck.PollingCheckCondition() { @Override public boolean canProceed() { return detailsFragment.mVideoFragment != null && detailsFragment.mVideoFragment.getView() != null && detailsFragment.mVideoFragment.getView().hasFocus(); } }); PollingCheck.waitFor(8000, new PollingCheck.PollingCheckCondition() { @Override public boolean canProceed() { return ((PlaybackFragment) detailsFragment.mVideoFragment).mBgAlpha == 0; } }); sendKeys(KeyEvent.KEYCODE_BACK); PollingCheck.waitFor(4000, new PollingCheck.ActivityDestroy(activity)); }