Resource resource = test.createResource("test.xml", XMLResource.RESOURCE_TYPE);
resource.setContent("<test/>");
test.storeResource(resource);
//create /db/securityTest2/parentCollection with owner "test1:users" and mode "rwxrwxrwx"
Collection parentCollection = cms.createCollection("parentCollection");
UserManagementService ums = (UserManagementService)parentCollection.getService("UserManagementService", "1.0");
ums.chmod("rwxrwxrwx");
//now copy /db/securityTest2/test.xml to /db/securityTest2/parentCollection/test.xml
//as user3, it should have it's group set to the primary group of user3 i.e. 'guest'