EnterDeckTitlePresenter { public void nextButtonClicked() { if (isDeckTitleEmpty()) return; activity.startActivityWithClass(EnterDeckSourceLanguageActivity.class); } EnterDeckTitlePresenter(EnterDeckTitleView activity, NewDeckContext newDeckContext); void updateDeckTitleInput(); void inflateBitmaps(); void backButtonClicked(); void nextButtonClicked(); void deckTitleInputChanged(String deckTitle);  }
@Test public void shouldStartEnterDeckSourceLanguageActivityWhenADeckTitleExists() { when(newDeckContext.getDeckTitle()).thenReturn(A_DECK_TITLE); presenter.nextButtonClicked(); verify(activity).startActivityWithClass(EnterDeckSourceLanguageActivity.class); }
@Test public void shouldNotStartEnterDeckSourceLanguageActivityWhenADeckTitleDoesNotExist() { when(newDeckContext.getDeckTitle()).thenReturn(NO_DECK_TITLE); presenter.nextButtonClicked(); verify(activity, times(0)).startActivityWithClass(EnterDeckSourceLanguageActivity.class); }