assertTrue(needle > pdfHaystack && pdfHaystack > outerHaystack);
//plagiarized from POIContainerExtractionTest. Thank you!
TrackingHandler tracker = new TrackingHandler();
TikaInputStream tis;
ContainerExtractor ex = new ParserContainerExtractor();
try{
tis= TikaInputStream.get(getResourceAsStream("/test-documents/testPDFEmbeddingAndEmbedded.docx"));
ex.extract(tis, ex, tracker);
} finally {
stream.close();
}
assertEquals(true, ex.isSupported(tis));
assertEquals(3, tracker.filenames.size());
assertEquals(3, tracker.mediaTypes.size());
assertEquals("image1.emf", tracker.filenames.get(0));
assertNull(tracker.filenames.get(1));
assertEquals("My first attachment", tracker.filenames.get(2));