@Test
public void testEmptyPlanJar() throws Exception {

    final File targetDir = new File("target/test-temp");
    targetDir.mkdirs();
    final File mfJar = new File(targetDir, "emptyplan.jar");
    final File mfCache = new File(targetDir, "emptyplan.cache");
    if (mfJar.exists()) {
        mfJar.delete();
    }
    final File mfDir = new File("src/test/resources/plans/xEmpty");
    final File mfFile = new File(mfDir, JarFile.MANIFEST_NAME);
    try (InputStream mfStream = new FileInputStream(mfFile)) {
        Manifest manifest = new Manifest(mfStream);
        try (JarOutputStream mfJarOut = new JarOutputStream(new FileOutputStream(mfJar), manifest)) {
            // nothing to add
            mfJarOut.putNextEntry(new JarEntry("other-plan.json"));
            mfJarOut.write("{}".getBytes(StandardCharsets.UTF_8));
        }
    }
    Result<OpearFile> opearResult = result1((File file) -> new JarFile(file, true))
            .apply(mfJar)
            .flatMap(jar -> OpearFile.fromJar(jar, mfCache));
    opearResult.throwCause(Exception.class);
    assertTrue("opear result should be success ", opearResult.isSuccess());
    Result<OakpalPlan> plan = opearResult.map(OpearFile::getDefaultPlan).flatMap(OakpalPlan::fromJson);
    plan.throwCause(Exception.class);
    assertTrue("opear plan should be empty",
            plan.map(OakpalPlan::getChecklists).getOrDefault(Arrays.asList("not a checklist")).isEmpty());
}