@Test
    public void testBasicExtraction() throws Exception {

        Metadata metadata = new Metadata();
        String content = getText("testRTF.rtf", metadata);

        assertEquals("application/rtf", metadata.get(Metadata.CONTENT_TYPE));
        assertEquals(1, metadata.getValues(Metadata.CONTENT_TYPE).length);
        assertContains("Test", content);
        assertContains("indexation Word", content);
    }
Junit test class for the Tika {@link RTFParser}
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/test/java/org/apache/tika/parser/microsoft/rtf/RTFParserTest.java