ActivityLightCycleDispatcher implements LightCycleDispatcher<ActivityLightCycle<HostType>>, ActivityLightCycle<HostType> { @Override public void onSaveInstanceState(HostType host, Bundle bundle) { for (ActivityLightCycle<HostType> component : activityLightCycles) { component.onSaveInstanceState(host, bundle); } } ActivityLightCycleDispatcher(); @Override void bind(ActivityLightCycle<HostType> lightCycle); @Override void onCreate(HostType host, @Nullable Bundle bundle); @Override void onNewIntent(HostType host, Intent intent); @Override void onStart(HostType host); @Override void onResume(HostType host); @Override boolean onOptionsItemSelected(HostType host, MenuItem item); @Override void onPause(HostType host); @Override void onStop(HostType host); @Override void onSaveInstanceState(HostType host, Bundle bundle); @Override void onRestoreInstanceState(HostType host, Bundle bundle); @Override void onDestroy(HostType host);  }
@Test public void dispatchOnSaveInstanceState() { final Bundle bundle = Bundle.EMPTY; dispatcher.onSaveInstanceState(activity, bundle); verify(lightCycleComponent1).onSaveInstanceState(activity, bundle); verify(lightCycleComponent2).onSaveInstanceState(activity, bundle); }