@Test
public void testSimple() throws Exception {

    final Mmi mmi = new Mmi();
    final ExtensionNotification notification = new ExtensionNotification();
    mmi.setExtensionNotification(notification);
    notification.setContext(UUID.randomUUID().toString());
    notification.setRequestId("42");
    notification.setSource("fromhere");
    notification.setTarget("tothere");
    final AnyComplexType any = new AnyComplexType();
    notification.setData(any);
    final DocumentBuilderFactory factory = DocumentBuilderFactory
            .newInstance();
    factory.setNamespaceAware(true);
    final DocumentBuilder builder = factory.newDocumentBuilder();
    final Document document = builder.newDocument();
    final Element emma = document.createElementNS(EMMA_NAMESPACE,
            "emma:emma");
    emma.setAttribute("version", "1.0");
    document.appendChild(emma);
    final Element interpretation = document.createElementNS(EMMA_NAMESPACE,
            "emma:interpretation");
    interpretation.setAttribute("id", "dummy");
    interpretation
            .setAttributeNS(EMMA_NAMESPACE, "emma:medium", "acoustic");
    any.addContent(emma);
    interpretation.setAttributeNS(EMMA_NAMESPACE, "emma:mode", "mmi");
    float confidence = 0.4f;
    interpretation.setAttributeNS(EMMA_NAMESPACE, "emma:confidence",
            Float.toString(confidence));
    final String tokens = "this is a test";
    interpretation.setAttributeNS(EMMA_NAMESPACE, "emma:tokens",
            tokens);
    emma.appendChild(interpretation);
    final JAXBContext context = JAXBContext.newInstance(Mmi.class);
    Marshaller marshaller = context.createMarshaller();
    final EmmaSemanticInterpretationExtractor extractor = new EmmaSemanticInterpretationExtractor();
    marshaller.marshal(mmi, extractor);
    final RecognitionResult result = extractor.getRecognitonResult();
    Assert.assertEquals(tokens, result.getUtterance());
    Assert.assertEquals(confidence, result.getConfidence(), .001);
}