MyDecksPresenter { public void deleteDeck(Deck deck) { deckRepository.deleteDeck(deck.getDbId()); refreshMyDecksList(); } MyDecksPresenter(MyDecksView view, DeckRepository deckRepository); void refreshListFooter(); void refreshMyDecksList(); List<Deck> getDecks(); void deleteDeck(Deck deck);  }
@Test public void shouldDeleteADeck() { Deck deck = mock(Deck.class); long dbID = 10; when(deck.getDbId()).thenReturn(dbID); MyDecksPresenter myDecksPresenter = new MyDecksPresenter(view, deckRepository); myDecksPresenter.deleteDeck(deck); verify(deckRepository).deleteDeck(dbID); }