DrawerPresenter extends BaseActivityPresenter<DrawerMvp.View> implements DrawerMvp.Presenter { @Override public void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); view.updateToolbarTitle(toolbarTitle); } DrawerPresenter(DrawerMvp.View view); @Override void onPostCreate(Bundle savedInstanceState); @Override void onRestoreInstanceState(Bundle savedInstanceState); @Override void onNavigationItemSelected(@IdRes int itemId); @Override boolean onBackPressed();  }
@Test public void should_restore_toolbar_title_when_state_changes() { presenter.toolbarTitle = R.string.drawer_nav_speakers; presenter.onRestoreInstanceState(null); verify(view).updateToolbarTitle(R.string.drawer_nav_speakers); }