Subject admin = pool.getSecurityManager().authenticate("admin", "");
broker = pool.get(admin);
Collection collection = broker.getOrCreateCollection(null, TestConstants.TEST_COLLECTION_URI);
IndexInfo info = collection.validateXMLResource(null, broker, TestConstants.TEST_XML_URI, XML);
//TODO : unlock the collection here ?
collection.store(null, broker, info, XML, false);
@SuppressWarnings("unused")
org.exist.dom.DocumentImpl doc = info.getDocument();
broker.flush();
broker.saveCollection(null, collection);
} finally {