### Question:
ZipUtil { public static void unZip(String zipFilePath, String targetPath) { String thisTargetPath = targetPath; if (!thisTargetPath.endsWith("/")) { thisTargetPath += "/"; } int count = -1; File folder = new File(thisTargetPath); mkdirIfNotExists(folder); try (ZipFile zipFile = new ZipFile(zipFilePath, "gbk")) { Enumeration<?> entries = zipFile.getEntries(); while (entries.hasMoreElements()) { byte buf[] = new byte[BUFFER_SIZE]; ZipEntry entry = (ZipEntry) entries.nextElement(); String filename = entry.getName(); filename = thisTargetPath + filename; File file = new File(filename); if (entry.isDirectory()) { mkdirIfNotExists(file); continue; } if (filename.lastIndexOf(FILE_SEPERATOR) != -1) { File dir = new File(filename.substring(0, filename.lastIndexOf('/'))); mkdirIfNotExists(dir); } if (!file.createNewFile()) { throw new BusinessLevelException("创建文件失败：" + file.getAbsolutePath()); } try (InputStream is = zipFile.getInputStream(entry); OutputStream fos = newOutputStream(file.toPath()); BufferedOutputStream bos = new BufferedOutputStream(fos, BUFFER_SIZE);) { while ((count = is.read(buf)) > -1) { bos.write(buf, 0, count); } bos.flush(); } } } catch (IOException ioe) { LOGGER.error(ioe.toString(), ioe); } } private  ZipUtil(); static void unZip(String zipFilePath, String targetPath);  }### Answer:
@Test public void testNormal() { File file = new File(System.getProperty("java.io.tmpdir") + "/test_zip/"); ZipUtil.unZip(ZipUtilTest.class.getClassLoader().getResource("utils/test.zip").getPath(), file.getAbsolutePath() + "/"); assertTrue(file.listFiles().length > 0); Files.delete(file); }