@Test
public void testCacheJar_fail() throws Exception {

    buildDeepTestJar();
    final File cacheDir = new File("target/test-output/OpearFileTest/testCacheJar_fail/cache");
    if (cacheDir.exists()) {
        FileUtils.deleteDirectory(cacheDir);
    }
    new File(cacheDir, "deep-plan.json").mkdirs();
    assertTrue("fail to cache entry",
            OpearFile.cacheJar(new JarFile(deepTestTarget), cacheDir).isFailure());
    FileUtils.deleteDirectory(cacheDir);
    FileUtils.touch(new File(cacheDir, "META-INF"));
    assertTrue("fail to cache directory entry",
            OpearFile.cacheJar(new JarFile(deepTestTarget), cacheDir).isFailure());
}