@Test
public void testValidDoctypeHeader() {

    final StringBuilder builder = new StringBuilder();
    builder.append("<?xml version=\"1.0\"?>");
    builder.append("<!DOCTYPE grammar PUBLIC ");
    builder.append("\"-//W3C//DTD GRAMMAR 1.0//EN\" ");
    builder.append("\"http://www.w3.org/TR/speech-grammar/grammar.dtd\">");
    builder.append("<grammar version=\"1.0\" ");
    builder.append("xmlns=\"http://www.w3.org/2001/06/grammar\" ");
    builder.append("mode=\"voice\" xml:lang=\"de-DE\"/>");
    final GrammarDocument doc =
        GrammarUtil.getGrammarFromString(builder.toString());
    final GrammarType type = identifier.identify(doc);
    Assert.assertEquals(GrammarType.SRGS_XML, type);
}