@Test
public void nestedZipInDirectory() throws IOException
{

Directory dir = FileSystem.getFSRoot(new File("").getAbsoluteFile());
/ base convert does not do nested zips
Directory zip = dir.getFile("fileSystemTest/app2.zip").convert();
ssertNull(zip);
/ basic conversion works
ip = dir.getFile("fileSystemTest/app2.zip").convertNested();
ssertNotNull(zip);
/ we get the parent and our path right
ssertNotNull(zip.getParent());
ssertEquals("fileSystemTest", zip.getParent().getName());
ssertEquals("fileSystemTest/app2.zip", zip.getName());
/ files inside the nested zip have the correct path as well
File appMf = zip.getFile("META-INF/APPLICATION.MF");
ssertNotNull(appMf);
ssertEquals("fileSystemTest/app2.zip/META-INF/APPLICATION.MF", appMf.getName());
heckManifest(appMf.open());
/ root is right
ssertFalse(zip.isRoot());
ssertEquals(dir, zip.getRoot());
ssertEquals(dir, appMf.getRoot());
/ check URLs are correct
heckManifest(appMf.toURL().openStream());
unBasicDirTest(zip, "fileSystemTest/app2.zip/", appMf.getSize(), appMf.getLastModified());
}