### Question:
GameState implements Serializable { public String toString() { StringBuilder sb = new StringBuilder("GAME ["); sb.append(board.toKey()).append("]"); sb.append(": player(").append(player).append(")\n"); sb.append(" history ["); for (Board b : history) { sb.append(b.toKey()).append(","); } sb.append("]"); return sb.toString(); } GameState(Board board, List<Board> history, String player); String toString(); Board getBoard(); List<Board> getHistory(); String getPlayer(); static GameState playAtRandom(Board currentBoard, String player); int score();  }### Answer:
@Test public void testToString() { Board board = new Board(); List<Board> boards = board.nextBoards("X"); Board child = boards.get(0); Board grandChild = child.nextBoards("O").get(0); List<Board> parents = new ArrayList<Board>(); parents.add(child); parents.add(board); GameState gameState = new GameState(grandChild, parents, "X"); LOG.debug(gameState.toString()); }