@Test
public void testGetSemanticInterpretation() throws Exception, SemanticError {

    EngineManager.registerEngineListFactory(SphinxEngineListFactory.class
            .getName());
    Recognizer recognizer = (Recognizer) EngineManager
            .createEngine(new RecognizerMode(SpeechLocale.ENGLISH));
    recognizer.allocate();
    final GrammarManager manager = recognizer.getGrammarManager();
    final RuleGrammar grammar = manager.createRuleGrammar("grammar:test",
            "test");
    final RuleComponent[] components = new RuleComponent[] {
            new RuleToken("test"), new RuleTag("T") };
    final RuleSequence sequence = new RuleSequence(components);
    final Rule root = new Rule("test", sequence, Rule.PUBLIC);
    grammar.addRule(root);
    recognizer.processGrammars();
    final BaseResult result = new BaseResult(grammar, "test");
    final Jsapi20RecognitionResult res = new Jsapi20RecognitionResult(
            result);
    final DataModel model = Mockito.mock(DataModel.class);
    Assert.assertEquals("T", res.getSemanticInterpretation(model));
}