@Test
    public void testGetAvailableMoves() {
        System.out.println("getAvailableMoves");
        Board board = new Board(8, 12);
        RuleManager instance = new RuleManager();

        Set<Position> expResult = new HashSet<>(4);
        expResult.add(new Position(5, 2));
        expResult.add(new Position(5, 4));
        Set<Position> result = instance.getAvailableMoves(new Position(6, 3), board);
        assertEquals(expResult, result);

        expResult = new HashSet<>(4);
        expResult.add(new Position(5, 2));
        result = instance.getAvailableMoves(new Position(6, 1), board);
        assertEquals(expResult, result);

        expResult = new HashSet<>(4);
        result = instance.getAvailableMoves(new Position(7, 2), board);
        assertEquals(expResult, result);

        board.changeFieldAt(new Position(7, 2), Board.EMPTY);
        board.changeFieldAt(new Position(7, 4), Board.EMPTY);
        board.changeFieldAt(new Position(6, 3), Board.BLACK_KING);

        expResult = new HashSet<>(4);
        expResult.add(new Position(5, 2));
        expResult.add(new Position(5, 4));
        expResult.add(new Position(7, 2));
        expResult.add(new Position(7, 4));
        result = instance.getAvailableMoves(new Position(6, 3), board);
        assertEquals(expResult, result);

        board = new Board(8, 12);
        try {
            board.movePiece(new Position(1, 2), new Position(5, 2));
            board.movePiece(new Position(1, 4), new Position(5, 4));
        } catch (IllegalPieceMovementException ex) {
            Logger.getLogger(RuleManagerTest.class.getName()).log(Level.SEVERE, null, ex);
        }

        expResult = new HashSet<>(4);
        expResult.add(new Position(4, 1));
        expResult.add(new Position(4, 5));
        result = instance.getAvailableMoves(new Position(6, 3), board);
        assertEquals(expResult, result);

    }