@Test
public void testExtract() throws Exception {

    final Path output = folder.getRoot().toPath().resolve("output");
    Files.createDirectories(output);
    Path zipFile = IO.toPath(ZipUtilTest.class.getResource("example.zip").toURI());
    ZipUtil.extract(zipFile, output);
    assertTrue(Files.exists(output.resolve("file3.txt")));
    assertTrue(Files.exists(output.resolve("zipfile/file2.txt")));
    assertTrue(Files.exists(output.resolve("zipfile/file1.txt")));
    assertTrue(Files.exists(output.resolve("zipfile/dir/file4.txt")));
    IO.deleteFileOrDirectory(output);
    Files.createDirectories(output);
    // check that it can be opened multiple times
    ZipUtil.extract(zipFile, output);
    IO.deleteFileOrDirectory(output);
    Files.createDirectories(output);
    ZipUtil.extract(zipFile, output);
}