MainPresenterImpl extends SaveStatePresenter<MainView> implements MainPresenter { private void restoreData() { if (fullName != null && fullName.length() != 0) { getView().sayHello(fullName); } } @Inject  MainPresenterImpl(@NonNull UserRepository userRepository); @Override void onCreate(Bundle savedInstanceState); @Override void getUser(); @Override void onDestroy();  }
@Test public void testRestoreData() throws Exception { String fullName = "Nimble Library"; presenter.fullName = fullName; presenter.onCreate(any(Bundle.class)); verify(view).sayHello(fullName); }