### Question:
Tourney implements UnaryOperator<List<Player>> { @Override public List<Player> apply(List<Player> players) { UnaryOperator<List<Player>> game = new Game(numCards, isVerbose); Stream<List<Player>> stream = Stream.iterate(players, game).limit(numGames + 1); List<List<Player>> results = stream.collect(toList()); List<Player> newPlayers = results.get(results.size() - 1); logger.log("END TOURNEY", newPlayers); return newPlayers; } Tourney(int numCards, int numGames, boolean isVerbose); @Override List<Player> apply(List<Player> players);  }### Answer:
@Test public void testApply_Basic() { int numGames = 3; int numCards = 12; int maxCard = numCards; List<Player> players = new ArrayList<>(); Player p1 = new Player("p1", strategy, maxCard, new Hand()); Player p2 = new Player("p2", strategy, maxCard, new Hand()); Player p3 = new Player("p3", strategy, maxCard, new Hand()); players.add(p1); players.add(p2); players.add(p3); List<Player> newPlayers = new Tourney(numCards, numGames, false).apply(players); assertEquals(3, newPlayers.size()); assertEquals(0, newPlayers.get(0).getNumCardsInHand()); assertEquals(0, newPlayers.get(1).getNumCardsInHand()); assertEquals(0, newPlayers.get(2).getNumCardsInHand()); assertEquals(3, newPlayers.stream().map(p -> p.getPlayerStats().getNumGamesWon()).mapToInt(i->i).sum()); }