@Test
public void zipRecStrFile() throws Exception {

  File destFile = new File(destDir, "recStrFile.zip");
  Vector<String> names = new Vector<String>();
  names.add(srcFileName);
  names.add(nestedSrcDirName + File.separator);
  names.add(nestedSrcDirName + File.separator + nestedSrcFileName);
  String[] filenames = srcDir.list();
  for (int i = 0; i < filenames.length; i++)
    filenames[i] = srcDir.getCanonicalPath() + File.separator + filenames[i];
  File test = ZipUtil.zip(filenames, destFile, true, ZipUtil.NO_COMPRESSION);
  Assert.assertTrue(test.exists());
  ZipFile zip = new ZipFile(test);
  Assert.assertEquals(3, zip.size());
  Enumeration<? extends ZipEntry> entries = zip.entries();
  try {
    while (entries.hasMoreElements()) {
      ZipEntry entry = entries.nextElement();
      // The 'replace' method is used because the filesystem directory separator may not be the same as the Zip
      // files's
      Assert.assertTrue(names.contains(entry.getName().replace('/', File.separatorChar)));
    }
  } catch (AssertionError ae) {
    zip.close();
    throw ae;
  }
  zip.close();
}