class ApachePoiDocumentParser implements DocumentParser {

    @Override
    public Document parse(InputStream inputStream) {<FILL_FUNCTION_BODY>}
}

        try (POITextExtractor extractor = ExtractorFactory.createExtractor(inputStream)) {
            String text = extractor.getText();

            if (isNullOrBlank(text)) {
                throw new BlankDocumentException();
            }

            return Document.from(text);
        } catch (EmptyFileException e) {
            throw new BlankDocumentException();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    
<no_super_class>