### Question:
SplashPresenter extends BasePresenter<V> implements SplashMvpPresenter<V> { @Override public void onAttach(V mvpView) { super.onAttach(mvpView); startActivityWithDelay(); } @Inject  SplashPresenter(SchedulerProvider schedulerProvider,
                    CompositeDisposable compositeDisposable,
                    DataManager dataManager); @Override void onAttach(V mvpView);  }### Answer:
@Test public void decideNextActivity_UserNotLoggedIn_OpenLoginActivity() throws InterruptedException { when(dataManager.getCurrentUserLoggedInMode()). thenReturn(DataManager.LoggedInMode.LOGGED_IN_MODE_LOGGED_OUT.getType()); splashPresenter.onAttach(splashMvpView); Thread.sleep(2000); verify(splashMvpView).openLoginActivity(); }
@Test public void decideNextActivity_UserLoggedIn_OpenMainActivity() throws InterruptedException { when(dataManager.getCurrentUserLoggedInMode()). thenReturn(DataManager.LoggedInMode.LOGGED_IN_MODE_LOGGED_SERVER.getType()); splashPresenter.onAttach(splashMvpView); Thread.sleep(2500); verify(splashMvpView).openMainActivity(); }