@Test
public void testExtractInlineImages() throws Exception {

    File tempFile = File.createTempFile("tika-test-", "");
    assertTrue(tempFile.delete());
    assertTrue(tempFile.mkdir());
    // google guava library has better solution
    try {
        String[] params = {"--extract-dir="+tempFile.getAbsolutePath(),"-z", resourcePrefix + "/testPDF_childAttachments.pdf"};
        TikaCLI.main(params);
        String[] tempFileNames = tempFile.list();
        assertNotNull(tempFileNames);
        String allFiles = String.join(" : ", tempFileNames);
        File jpeg = new File(tempFile, "image0.jpg");
        //tiff isn't extracted without optional image dependency
          File tiff = new File(tempFile, "image1.tif");
        File jobOptions = new File(tempFile, "Press Quality(1).joboptions");
        File doc = new File(tempFile, "Unit10.doc");
        assertExtracted(jpeg, allFiles);
        assertExtracted(jobOptions, allFiles);
        assertExtracted(doc, allFiles);
    } finally {
        FileUtils.deleteDirectory(tempFile);
    }
}