repoField.set(resFac, getRepository());
// setup mappings
Field mappingsField = resFac.getClass().getDeclaredField("mappings");
mappingsField.setAccessible(true);
mappingsField.set(resFac, new Mapping[] { new Mapping("/-/"),
new Mapping(rootPath + "/-/") });
// ensure namespace mangling
Field mangeNamespacePrefixesField = resFac.getClass().getDeclaredField(
"mangleNamespacePrefixes");
mangeNamespacePrefixesField.setAccessible(true);