@Test public void recreateGoesThroughFullLifeCycle() throws Exception { TestActivity activity = buildActivity(TestActivity.class).attach().get(); activity.recreate(); activity.transcript.assertEventsSoFar( "onSaveInstanceState", "onPause", "onStop", "onRetainNonConfigurationInstance", "onDestroy", "onCreate", "onStart", "onRestoreInstanceState", "onResume"); Integer storedValue = (Integer) activity.getLastNonConfigurationInstance(); assertEquals(5, storedValue.intValue()); }