EnterDeckDestinationPresenter { public void nextButtonClicked() { if (!contextFromIntent.getDestinationLanguages().isEmpty()) { view.startActivityWithClass(EnterAuthorActivity.class); } } EnterDeckDestinationPresenter(EnterDeckDestinationView view, NewDeckContext contextFromIntent); void setBitmaps(); void deleteLanguage(String language); void newLanguageSelected(String selectedLanguage); void nextButtonClicked(); void backButtonClicked(); void refreshView(); void addNewDestinationLanguageClicked();  }
@Test public void shouldStartEnterAuthorActivityWhenNextButtonIsClickedWithDestinationLanguages() { HashSet<String> destinationLanguages = new HashSet<String>() {{ add(A_LANGUAGE); }}; when(newDeckContext.getDestinationLanguages()).thenReturn(destinationLanguages); presenter.nextButtonClicked(); verify(view).startActivityWithClass(EnterAuthorActivity.class); }
@Test public void shouldNotStartEnterAuthorActivityWhenNextButtonIsClickedWithNoDestinationLanguages() { presenter.nextButtonClicked(); verify(view, times(0)).startActivityWithClass(EnterAuthorActivity.class); }