archive.addClass(FSTestCase.class);
ZipExporter exporter = archive.as(ZipExporter.class);
exporter.exportTo(file, true);
//
URLDriver driver = new URLDriver();
driver.merge(file.toURI().toURL());
Node root = driver.root();
assertEquals("", driver.name(root));
assertTrue(driver.isDir(root));
//
Iterator<Node> rootChildren = driver.children(root).iterator();
Node org = rootChildren.next();
assertFalse(rootChildren.hasNext());
assertEquals("org", driver.name(org));
assertTrue(driver.isDir(org));
//
Iterator<Node> orgChildren = driver.children(org).iterator();
Node crsh = orgChildren.next();
assertFalse(orgChildren.hasNext());
assertEquals("crsh", driver.name(crsh));
assertTrue(driver.isDir(crsh));
//
Iterator<Node> vfsChildren = driver.children(crsh).iterator();
Node vfs = vfsChildren.next();
assertFalse(vfsChildren.hasNext());
assertEquals("vfs", driver.name(vfs));
assertTrue(driver.isDir(vfs));
//
Iterator<Node> clazzChildren = driver.children(vfs).iterator();
Node clazz = clazzChildren.next();
assertFalse(clazzChildren.hasNext());
assertEquals(FSTestCase.class.getSimpleName() + ".class", driver.name(clazz));
assertFalse(driver.isDir(clazz));
Iterator<InputStream> in = driver.open(clazz);
assertTrue(in.hasNext());
in.next().close();
assertFalse(in.hasNext());
}