MyDecksPresenter { public void refreshMyDecksList() { decks = deckRepository.getAllDecks(); view.updateMyDecksList(decks); refreshListFooter(); } MyDecksPresenter(MyDecksView view, DeckRepository deckRepository); void refreshListFooter(); void refreshMyDecksList(); List<Deck> getDecks(); void deleteDeck(Deck deck);  }
@Test public void shouldRefreshMyDecksList() { List<Deck> decks = listWithOneDeck(); when(deckRepository.getAllDecks()).thenReturn(decks); MyDecksPresenter myDecksPresenter = new MyDecksPresenter(view, deckRepository); myDecksPresenter.refreshMyDecksList(); verify(deckRepository, times(2)).getAllDecks(); verify(view).updateMyDecksList(decks); verify(view).nonEmptyViewState(); verify(view).updateMyDeckListCentered(IS_NOT_CENTERED); }