ReviewAndSaveDeckPresenter { public void initializeView() { view.setDeckItem(contextFromIntent.getDeck()); fillLanguagesList(); } ReviewAndSaveDeckPresenter(ReviewAndSaveDeckView view, NewDeckContext contextFromIntent, DeckRepository deckRepository); void backButtonClicked(); void inflateBitmap(); void saveButtonClicked(); void initializeView();  }
@Test public void shouldSetDeckItemWhenViewIsInitialized() { Deck aDeck = mock(Deck.class); when(newDeckContext.getDeck()).thenReturn(aDeck); presenter.initializeView(); verify(view).setDeckItem(aDeck); }
@Test public void shouldFormatAndFillDestinationLanguagesWhenViewIsInitialized() { final String someLanguage = "some other language"; HashSet<String> destinationLanguages = new HashSet<String>() {{ add(someLanguage); add(A_LANGUAGE); }}; when(newDeckContext.getDestinationLanguages()).thenReturn(destinationLanguages); presenter.initializeView(); verify(view).fillLanguageList(A_LANGUAGE.toUpperCase() + " " + someLanguage.toUpperCase()); }