@Test void testZipEmptyFolder() throws IOException { byte[] bytes = ZipBuilder .createZipInMemory() .addFolder("myEmptyFolder") .toBytes(); File tempDir = FileUtil.createTempDirectory(); tempDir.deleteOnExit(); File zipFile = new File(tempDir, "test.zip"); FileUtil.writeBytes(zipFile, bytes); // read zip List<String> entries = ZipUtil.listZip(zipFile); assertEquals(1, entries.size()); assertEquals("myEmptyFolder/", entries.get(0)); }