MvpBasePresenter implements MvpPresenter<V> { @Deprecated @UiThread @Override public void detachView(boolean retainInstance) { }  @UiThread @Override void attachView(V view); @Deprecated @UiThread V getView(); @Deprecated @UiThread boolean isViewAttached(); @Deprecated @UiThread @Override void detachView(boolean retainInstance); @Override void detachView(); @Override void destroy();  }
@Test public void testDetachView() { MvpBasePresenter<MvpView> presenter = new MvpBasePresenter<>(); MvpView mvpView = new MvpView() { }; presenter.attachView(mvpView); presenter.detachView(); presenter.destroy(); assertViewNotAttachedAndNull(presenter); }