    @Test
    void parseSyntactic() {

        Rule r1 = new Rule("$A", "a");
        Rule r2 = new Rule("$B", "b");
        Rule r3 = new Rule("$C", "$A $B");

        Grammar grammar = new Grammar(Arrays.asList(r1, r2, r3), "$C");
        Parser p = new Parser(grammar, s -> Arrays.asList(s.split(" ")), Collections.emptyList());

        Derivation dc1 = new Derivation(r1, null);
        Derivation dc2 = new Derivation(r2, null);

        Derivation expected = new Derivation(r3, Arrays.asList(dc1, dc2));
        Derivation actual = p.parseSyntactic("a b").get(0);

        assertEquals(expected.rule, actual.rule);
        assertEquals(expected.children.get(0).rule, actual.children.get(0).rule);
        assertEquals(expected.children.get(1).rule, actual.children.get(1).rule);

    }