@Test(timeout = 4000)
public void testStartRecognition() throws Exception, JVoiceXMLEvent {

    final SrgsXmlDocument document = new SrgsXmlDocument();
    final Grammar grammar = document.getGrammar();
    grammar.setXmlLang(Locale.US);
    final Rule rule = grammar.appendChild(Rule.class);
    rule.makePublic();
    rule.setId("root");
    grammar.setRoot(rule);
    rule.addText("test");
    final String xml = document.toString();
    final File file = File.createTempFile("jvxmltest", "srgs");
    final URI uri = writeToFile(file, xml);
    final GrammarImplementation<?> impl =
        input.loadGrammar(uri, GrammarType.SRGS_XML);
    final Collection<GrammarImplementation<?>> implementations =
        new java.util.ArrayList<GrammarImplementation<?>>();
    implementations.add(impl);
    input.activateGrammars(implementations);
    input.startRecognition(null, null, null);
    synchronized (monitor) {
        monitor.wait();
    }
}