@Test
public void testIdentifyGrammarNode() throws Exception {

    final String cr = System.getProperty("line.separator");
    final VoiceXmlDocument document = new VoiceXmlDocument();
    final Vxml vxml = document.getVxml();
    final Form form = vxml.appendChild(Form.class);
    final Grammar grammar = form.appendChild(Grammar.class);
    grammar.setType(GrammarType.JSGF);
    final StringBuilder str = new StringBuilder();
    str.append("#JSGF V1.0;");
    str.append(cr);
    str.append("grammar jvoicexml;");
    str.append(cr);
    str.append("public <boolean> = yes{true}|no{false};");
    grammar.addCData(str.toString());
    final GrammarDocument grammarDocument =
        new InternalGrammarDocument(grammar);
    final GrammarType type = identifier.identify(grammarDocument);
    Assert.assertEquals(GrammarType.JSGF, type);
}