Presenter { public final void takeView(@Nonnull V view) { requireNotNull(view); final V currentView = currentView(); if (currentView != view) { if (currentView != null) { dropView(currentView); } getProxy(viewProxy).set(view); onTakeView(view); } } protected  Presenter(@Nonnull V view); protected  Presenter(); final void dropView(@Nonnull V view); final boolean hasView(); final void takeView(@Nonnull V view);  }
@Test public void shouldCallOnTakeViewAfterViewIsTaken() { presenter.dummy = false; presenter.takeView(view); }
@Test public void takenViewShouldNotBeNull() { checkIllegalArgumentException(() -> presenter.takeView(null)); }