@Test
public void testCreateXMLDocument() {

    try {
        final SearchResourceContext resourceContext = new SearchResourceContext();
        resourceContext.setBusinessControlFor(olatResourcable);
        final Document xmlDocument = FileDocumentFactory.createDocument(resourceContext, new LocalFileImpl(getTestFile("XMLDocument.xml")));
        // check content
        final String content = xmlDocument.get(AbstractOlatDocument.CONTENT_FIELD_NAME);
        assertEquals("Wrong XML content", "content", content.trim());
    } catch (final Exception e) {
        e.printStackTrace();
        fail(e.getClass().getSimpleName() + ": " + e.getMessage());
    }
}