SaveReceivedCards { public void save(List<Card> receivedCards, Callback callback) { for (Card receivedCard : receivedCards) { receivedCard.setIsUser(false); receivedCard.setCreatedAt(null); } database.saveCards(receivedCards); callback.onSavedReceivedCards(receivedCards); } @Inject  SaveReceivedCards(Database database); void save(List<Card> receivedCards, Callback callback);  }
@Test public void testGet() { List<Card> cards = Arrays.asList(new Card(), new Card()); saveReceivedCards.save(cards, callback); verify(database).saveCards(eq(cards)); verify(callback).onSavedReceivedCards(eq(cards)); }