class EightQueens {

    static boolean isSolution(List<Position> board) {
        int size = board.size();
        for (int i = 0; i < size; i++) {
            Position firstPosition = board.get(i);
            if (firstPosition.intersectPositions(board, i)) {
                return false;
            }
        }
        return true;
    }

}

class EightQueensTest {

    @Test
    public void
    it_should_refuse_two_queens_with_same_y(){

        List<Position> board = asList(pos(0, 0), pos(1, 0));
        assertFalse(EightQueens.isSolution(board));
    }

}