@Test
public void testGetRule() throws Exception {

    final SrgsXmlDocument document = new SrgsXmlDocument();
    final Grammar grammar = document.getGrammar();
    grammar.setRoot("test1");
    final Rule rule1 = grammar.appendChild(Rule.class);
    rule1.makePublic();
    rule1.setId("test1");
    final Rule rule2 = grammar.appendChild(Rule.class);
    rule2.setId("test2");
    final Rule rule1Node = grammar.getRule("test1");
    Assert.assertEquals(rule1, rule1Node);
    final Rule rule2Node = grammar.getRule("test2");
    Assert.assertEquals(rule2, rule2Node);
}