@Test
    public void testParseLoop() {
        parser.parse("A(2){BC}ABbaBB");
        assertEquals("abbbbbbabbbabbbb", parser.getOutputString());

        grammar = new GrammarParser();
        grammar.productionRules.add(new Rule("A", "a"));
        grammar.productionRules.add(new Rule("B", "BB"));
        parser = new InitialisationParser(grammar);
        parser.parse("ab(3){B}aB");
        assertEquals("abBBBBBBBBaBB", parser.getOutputString());
    }