@Test public void shouldBeAbleToCreateEmptyArchiveWhenOverwriting() throws IOException { CustomZipOutputStream ignored = ZipOutputStreams.newOutputStream(output, OVERWRITE_EXISTING); ignored.close(); try (Zip zip = new Zip(output, false)) { assertTrue(zip.getFileNames().isEmpty()); } }
@Test public void shouldBeAbleToCreateEmptyArchive() throws IOException { CustomZipOutputStream ignored = ZipOutputStreams.newOutputStream(output); ignored.close(); try (Zip zip = new Zip(output, /* forWriting */ false)) { assertTrue(zip.getFileNames().isEmpty()); } }