@Test
public void testGetXmlNode() throws Exception {

    final SrgsXmlDocument document = new SrgsXmlDocument();
    final Grammar grammar = document.getGrammar();
    grammar.setRoot("test");
    final Rule rule = grammar.appendChild(Rule.class);
    rule.setId("test");
    rule.addText("this is a test");
    final SrgsNodeFactory factory = new SrgsNodeFactory();
    final SrgsNode node = factory.getXmlNode(rule);
    Assert.assertNotNull(node);
    Assert.assertEquals(Rule.TAG_NAME, node.getTagName());
}