public String parseExample() throws IOException, SAXException, TikaException {
        AutoDetectParser parser = new AutoDetectParser();
        BodyContentHandler handler = new BodyContentHandler();
        Metadata metadata = new Metadata();
        try (InputStream stream = ParsingExample.class.getResourceAsStream("test.doc")) {
            parser.parse(stream, handler, metadata);
            return handler.toString();
        }
    }
@Test
    public void testParseExample() throws IOException, SAXException, TikaException {
        String result = parsingExample
                .parseExample()
                .trim();
        assertEquals("test", result, "Expected 'test', but got '" + result + "'");
    }