{
URI uri = new URI("vfsmemory://aopdomain");
URL root = new URL("vfsmemory://aopdomain");
VFSContextFactory factory = VFSContextFactoryLocator.getFactory(uri);
VFSContext ctx = factory.getVFS(uri);
MemoryContextHandler parent = new MemoryContextHandler(ctx, null, root, "aopdomain");
URI uri2 = new URI("vfsmemory://aopdomain/child");
URL root2 = new URL("vfsmemory://aopdomain/child");
VFSContextFactory factory2 = VFSContextFactoryLocator.getFactory(uri2);
VFSContext ctx2 = factory2.getVFS(uri);
MemoryContextHandler child = new MemoryContextHandler(ctx2, parent, root2, "child");
serializeDeserialize(child, MemoryContextHandler.class);
byte[] bytes = serialize(parent);
Object deserializedObject = deserialize(bytes);
assertInstanceOf(deserializedObject, MemoryContextHandler.class);
MemoryContextHandler desParent = (MemoryContextHandler)deserializedObject;
List<VirtualFileHandler> list = desParent.getChildren(true);
assertNotNull(list);
assertFalse(list.isEmpty());
assertNotNull(desParent.getChild("child"));
}