@Test
public void zipCloseableZipSimplePerformanceTest() throws IOException
{

 int N = 100000;
 File baseDir = new File("fileSystemTest/app2.zip");
 ZipFile zip = new ZipFile(baseDir);
 long start = System.currentTimeMillis();
 for (int i=0; i<N; i++) {
  ZipEntry ze = zip.getEntry("META-INF/APPLICATION.MF");
  InputStream is = zip.getInputStream(ze);
  is.close();
 }
 zip.close();
 long duration = System.currentTimeMillis() - start;
 // normal zip files
 ICloseableDirectory dir = FileSystem.getFSRoot(baseDir).toCloseable();
 start = System.currentTimeMillis();
 for (int i=0; i<N; i++) {
  IFile appMf = dir.getFile("META-INF/APPLICATION.MF");
  InputStream is = appMf.open();
  is.close();
 }
 long duration2 = System.currentTimeMillis() - start;
 dir.close();
 // within an order of magnitude
 assertTrue("ZipFile: "+duration+", IDirectory: "+duration2 , duration2 < 10*duration );
 // nested zip files
 IDirectory outer = FileSystem.getFSRoot(new File("fileSystemTest/outer.zip"));
 IFile innerFile = outer.getFile("app2.zip");
 dir = innerFile.convertNested().toCloseable();
 start = System.currentTimeMillis();
 for (int i=0; i<N; i++) {
  IFile appMf = dir.getFile("META-INF/APPLICATION.MF");
  InputStream is = appMf.open();
  is.close();
 }
 long duration3 = System.currentTimeMillis() - start;
 dir.close();
 // within an order of magnitude
 assertTrue("ZipFile: "+duration+", IDirectory: "+duration3 , duration3 < 10*duration );
}