EnterAuthorPresenter { public void nextButtonClicked() { if (newDeckContext.getAuthor().isEmpty()) return; activity.startActivityWithClass(ReviewAndSaveDeckActivity.class); } EnterAuthorPresenter(EnterAuthorView activity, NewDeckContext newDeckContext); void inflateBitmaps(); void initDeckAuthorInput(); void nextButtonClicked(); void backButtonClicked(); void deckAuthorInputChanged(String deckAuthor);  }
@Test public void shouldUpdateContextWithAuthorAndStartNextActivityWhenNextButtonIsClicked() { when(newDeckContext.getAuthor()).thenReturn(AN_AUTHOR); presenter.nextButtonClicked(); verify(activity).startActivityWithClass(ReviewAndSaveDeckActivity.class); }
@Test public void shouldNotUpdateContextOrStartActivityWhenNextButtonIsClickedWithAnEmptyAuthor() { when(newDeckContext.getAuthor()).thenReturn(EMPTY_DECK_AUTHOR); presenter.nextButtonClicked(); verifyZeroInteractions(activity); }