@Test
public void testEmbeddedLinkedDocument() throws Exception {

    Set<MediaType> skipTypes = new HashSet<MediaType>();
    skipTypes.add(MediaType.parse("image/emf"));
    skipTypes.add(MediaType.parse("image/wmf"));
    TrackingHandler tracker = new TrackingHandler(skipTypes);
    try (TikaInputStream tis = TikaInputStream.get(getResourceAsStream("/test-documents/testRTFEmbeddedLink.rtf"))) {
        ContainerExtractor ex = new ParserContainerExtractor();
        assertEquals(true, ex.isSupported(tis));
        ex.extract(tis, ex, tracker);
    }
    //should gracefully skip link and not throw NPE, IOEx, etc
    assertEquals(0, tracker.filenames.size());
    tracker = new TrackingHandler();
    try (TikaInputStream tis = TikaInputStream.get(getResourceAsStream("/test-documents/testRTFEmbeddedLink.rtf"))) {
        ContainerExtractor ex = new ParserContainerExtractor();
        assertEquals(true, ex.isSupported(tis));
        ex.extract(tis, ex, tracker);
    }
    //should gracefully skip link and not throw NPE, IOEx, etc
    assertEquals(2, tracker.filenames.size());
}