r1.setContent("r1c1");
registry.put("/vtr1", r1);
registry.createVersion("/");
Collection c2 = registry.newCollection();
registry.put("/vtc2", c2);
registry.createVersion("/");
String[] rootVersions = registry.getVersions("/");
Collection rootV0 = (Collection) registry.get(rootVersions[0]);
String[] rootV0Children = (String[]) rootV0.getContent();
assertTrue("Root should have child vtr1",
RegistryUtils.containsAsSubString("/vtr1", rootV0Children));
assertTrue("Root should have child vtc2",
RegistryUtils.containsAsSubString("/vtc2", rootV0Children));
Collection rootV1 = (Collection) registry.get(rootVersions[1]);
String[] rootV1Children = (String[]) rootV1.getContent();
assertTrue("Root should have child vtr1",
RegistryUtils.containsAsSubString("/vtr1", rootV1Children));
assertFalse("Root should not have child vtc2",
RegistryUtils.containsAsSubString("/vtc2", rootV1Children));
}