@Test
public void testCreateExcelOOXMLDocument() {

    try {
        final SearchResourceContext resourceContext = new SearchResourceContext();
        resourceContext.setBusinessControlFor(olatResourcable);
        final Document excelDocument = FileDocumentFactory.createDocument(resourceContext, new LocalFileImpl(getTestFile("ExcelOOXMLDocument.xlsx")));
        // check content
        final String content = excelDocument.get(AbstractOlatDocument.CONTENT_FIELD_NAME);
        assertTrue("Wrong Excel (xlsx) content", content.contains("Sheet1"));
        assertTrue("Wrong Excel (xlsx) content", content.contains("Sheet1:A1"));
        assertTrue("Wrong Excel (xlsx) content", content.contains("Sheet1:D4"));
        assertTrue("Wrong Excel (xlsx) content", content.contains("Sheet1:H8"));
        assertTrue("Wrong Excel (xlsx) content", content.contains("Sheet2"));
        assertTrue("Wrong Excel (xlsx) content", content.contains("Sheet2:A1"));
        assertTrue("Wrong Excel (xlsx) content", content.contains("Sheet2:D4"));
        assertTrue("Wrong Excel (xlsx) content", content.contains("Sheet2:H8"));
    } catch (final Exception e) {
        e.printStackTrace();
        fail(e.getClass().getSimpleName() + ": " + e.getMessage());
    }
}