@Test
    public void testWORDxtraction() throws Exception {
        Parser parser = TIKA.getParser();
        Metadata metadata = new Metadata();
        try (TikaInputStream tis = TikaInputStream
                .get(getResourceAsStream("/test-documents/testWORD.doc"))) {
            try (InputStream stream = new FileInputStream(tis.getFile())) {
                parser.parse(stream, new DefaultHandler(), metadata, new ParseContext());
            }
        }
        assertEquals("Sample Word Document", metadata.get(TikaCoreProperties.TITLE));
    }
Junit test class for Tika {@link Parser}s.
tika-parsers/tika-parsers-standard/tika-parsers-standard-package/src/test/java/org/apache/tika/parser/TestParsers.java