fragment/src/androidTest/java/androidx/fragment/app/FragmentLifecycleTest.java
@Test
    @UiThreadTest
    public void nullNonConfig() throws Throwable {
        FragmentController fc = FragmentTestUtil.createController(mActivityRule);
        FragmentTestUtil.resume(mActivityRule, fc, null);
        FragmentManager fm = fc.getSupportFragmentManager();

        Fragment fragment1 = new StrictFragment();
        fm.beginTransaction()
                .add(fragment1, "1")
                .addToBackStack(null)
                .commit();
        fm.executePendingTransactions();
        Pair<Parcelable, FragmentManagerNonConfig> savedState =
                FragmentTestUtil.destroy(mActivityRule, fc);
        assertNull(savedState.second);
    }
/**
     * When there are no retained instance fragments, the FragmentManagerNonConfig's fragments
     * should be null
     */
When there are no retained instance fragments, the FragmentManagerNonConfig's fragments
should be null
When there are no retained instance fragments the FragmentManagerNonConfig ' s fragments should be null
@Test
    @UiThreadTest
    public void nullNonConfig() throws Throwable {
        FragmentController fc = FragmentTestUtil.createController(mActivityRule);
        FragmentTestUtil.resume(mActivityRule, fc, null);
        FragmentManager fm = fc.getSupportFragmentManager();
        Fragment fragment1 = new StrictFragment();
        fm.beginTransaction()
                .add(fragment1, "1")
                .addToBackStack(null)
                .commit();
        fm.executePendingTransactions();
        Pair<Parcelable, FragmentManagerNonConfig> savedState =
                FragmentTestUtil.destroy(mActivityRule, fc);
        assertNull(savedState.second);
    }
@ Test @ UiThreadTest public void nullNonConfig ( ) throws Throwable { FragmentController fc = FragmentTestUtil . createController ( mActivityRule ) ; FragmentTestUtil . resume ( mActivityRule , fc , null ) ; FragmentManager fm = fc . getSupportFragmentManager ( ) ; Fragment fragment1 = new StrictFragment ( ) ; fm . beginTransaction ( ) . add ( fragment1 , "1" ) . addToBackStack ( null ) . commit ( ) ; fm . executePendingTransactions ( ) ; Pair < Parcelable , FragmentManagerNonConfig > savedState = FragmentTestUtil . destroy ( mActivityRule , fc ) ; assertNull ( savedState . second ) ; }
When there are no retained instance fragments, the FragmentManagerNonConfig's fragments
 should be null
When there are no retained instance fragments the FragmentManagerNonConfig ' s fragments should be null