MongoMK mk1 = builder.setClusterId(1).open();
builder = new MongoMK.Builder();
builder.setDocumentStore(ds).setBlobStore(bs).setAsyncDelay(1);
MongoMK mk2 = builder.setClusterId(2).open();
Oak oak = new Oak(mk1)
.with(new InitialContent())
.with(new ReferenceEditorProvider())
.with(new ReferenceIndexProvider())
.with(new PropertyIndexEditorProvider())
.with(new PropertyIndexProvider())
.with(new TypeEditorProvider())
.with(securityProvider1 = new SecurityProviderImpl(getSecurityConfigParameters()));
contentRepository1 = oak.createContentRepository();
adminSession1 = login1(getAdminCredentials());
root1 = adminSession1.getLatestRoot();
userManager1 = securityProvider1.getConfiguration(UserConfiguration.class).getUserManager(root1, namePathMapper);
aclMgr1 = securityProvider1.getConfiguration(AuthorizationConfiguration.class).getAccessControlManager(root1, namePathMapper);
oak = new Oak(mk2)
.with(new InitialContent())
.with(new ReferenceEditorProvider())
.with(new ReferenceIndexProvider())
.with(new PropertyIndexEditorProvider())
.with(new PropertyIndexProvider())
.with(new TypeEditorProvider())
.with(securityProvider2 = new SecurityProviderImpl(getSecurityConfigParameters()));
contentRepository2 = oak.createContentRepository();
adminSession2 = login2(getAdminCredentials());
root2 = adminSession2.getLatestRoot();
userManager2 = securityProvider2.getConfiguration(UserConfiguration.class).getUserManager(root2, namePathMapper);
aclMgr2 = securityProvider2.getConfiguration(AuthorizationConfiguration.class).getAccessControlManager(root2, namePathMapper);
}