### Question:
PlayerGame implements Tickable { public void remove(Consumer<PlayerGame> onRemove) { if (onRemove != null) { onRemove.accept(this); } game.close(); player.close(); } PlayerGame(Player player, Game game, String roomName); static PlayerGame by(Game game); @Override boolean equals(Object o); @Override int hashCode(); void remove(Consumer<PlayerGame> onRemove); GameField getField(); @Override String toString(); @Override void tick(); GameType getGameType(); void setRoomName(String roomName); Player getPlayer(); String popLastCommand(); void clearScore();  }### Answer:
@Test public void testRemove() { boolean[] removed = {false}; Consumer<PlayerGame> onRemove = playerGame -> removed[0] = true; playerGame.remove(onRemove); verify(game).close(); assertEquals(true, removed[0]); }