EightQueens { public static List<Position> findSolution(int boardSize) { List<Position> generated; while (true) { generated = generate(boardSize); if (isSolution(generated)) return generated; } }  static List<Position> findSolution(int boardSize);  }
@Test public void it_generates_a_solution() { System.out.print(EightQueens.findSolution(8).toString()); }