@Test
public void testCreateExcelOOXMLDocumentSlow() {

    try {
        final SearchResourceContext resourceContext = new SearchResourceContext();
        resourceContext.setBusinessControlFor(olatResourcable);
        final Thread excelTextExtractionThread = new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    FileDocumentFactory.createDocument(resourceContext, new LocalFileImpl(getTestFile("ExcelOOXMLDocumentSlow.xlsx")));
                } catch (Exception e) {
                    // ignore
                }
            }
        });
        excelTextExtractionThread.start();
        Thread.sleep(5000);
        assertFalse("Text extraction for Excel (xlsx) must not take longer than 2s.", excelTextExtractionThread.getState().equals(State.RUNNABLE));
    } catch (final Exception e) {
        e.printStackTrace();
        fail(e.getClass().getSimpleName() + ": " + e.getMessage());
    }
}