GetReceivedCards { public void get(Callback callback) { List<Card> receivedCards = database.getReceivedCards(); callback.onGetReceivedCards(receivedCards); } @Inject  GetReceivedCards(Database database); void get(Callback callback);  }
@Test public void testGet() { List<Card> cards = Arrays.asList(new Card(), new Card()); when(database.getReceivedCards()).thenReturn(cards); getReceivedCards.get(callback); verify(callback).onGetReceivedCards(eq(cards)); }