EnterAuthorPresenter { public void deckAuthorInputChanged(String deckAuthor) { newDeckContext.setAuthor(deckAuthor); if (deckAuthor.isEmpty()) { activity.disableNextButton(); } else { activity.enableNextButton(); } } EnterAuthorPresenter(EnterAuthorView activity, NewDeckContext newDeckContext); void inflateBitmaps(); void initDeckAuthorInput(); void nextButtonClicked(); void backButtonClicked(); void deckAuthorInputChanged(String deckAuthor);  }
@Test public void shouldDisableNextButtonWhenNoDeckAuthorEntered() { presenter.deckAuthorInputChanged(EMPTY_DECK_AUTHOR); verify(activity).disableNextButton(); }
@Test public void shouldEnableNextButtonWhenDeckAuthorEntered() { presenter.deckAuthorInputChanged(AN_AUTHOR); verify(activity).enableNextButton(); }
@Test public void shouldUpdateNewDeckContextWhenDeckAuthorInputChanges() { presenter.deckAuthorInputChanged(AN_AUTHOR); verify(newDeckContext).setAuthor(AN_AUTHOR); }