{
long seed = System.nanoTime();
URL url = getResource("/vfs/test/nested");
VFS vfs = VFS.getVFS(url);
VFSUtils.enableCopy(vfs);
TempStore store = new MkdirTempStore(new TrackingTempStore(new MockTempStore(seed)));
try
{
vfs.setTempStore(store);
VirtualFile file = vfs.getChild("nested.jar");
assertNotNull(file.getChild("complex.jar/subfolder/subchild"));
try
{
File tempRoot = AbstractCopyMechanism.getTempDirectory();
File test = new File(tempRoot, "complex.jar" + '_' + seed);
assertTrue(test.exists()); // should be created by MockTS
}
finally
{
file.cleanup();
}
}
finally
{
store.clear();
}
}