### Question:
ZipUtil { public List<ZipEntry> listZipEntries(File zipsource) { List<ZipEntry> files = new ArrayList<ZipEntry>(); try (java.util.zip.ZipFile zipFile = new java.util.zip.ZipFile(zipsource)) { @SuppressWarnings("unchecked") Enumeration<ZipEntry> e = (Enumeration<ZipEntry>) zipFile.entries(); while (e.hasMoreElements()) { ZipEntry zipEntry = (ZipEntry) e.nextElement(); files.add(zipEntry); } files.sort(new Comparator<ZipEntry>() { @Override public int compare(ZipEntry o1, ZipEntry o2) { return o1.getName().compareTo(o2.getName()); } }); } catch (Throwable e) { logError(e.getMessage()); } return files; } ZipUtil();  ZipUtil(String charset); List<ZipEntry> listZipEntries(File zipsource); List<String> listEntries(File zipsource); boolean unzip(String zipsource, String target); byte[] getEntryBytes(File zipsource, String entry); InputStream getEntryStream(File zip, String entry); String getEntryContent(File zip, String entry); static void addEntry(File zip, String entry, InputStream content); void zipFile(File src, File dest); void zipFolder(File inFolder, File outFile); String getFileNameCharset(); void setFileNameCharset(String fileNameCharset);  }### Answer:
@Test public void testListZipEntries() throws IOException { File file = new File("target/test.zip"); FileUtil.copyResource("/test.zip", file); ZipUtil zipUtil = new ZipUtil(); List<ZipEntry> entries = zipUtil.listZipEntries(file); for (ZipEntry zipEntry : entries) { System.out.println(zipEntry.getName()+" "+zipEntry.getSize()+" "+zipEntry.getLastModifiedTime()); } Assert.assertEquals(3, entries.size()); }