protected Repository[] internalSetUpCluster(int n) throws Exception {
Repository[] cluster = new Repository[n];
stores = new SegmentStore[cluster.length];
mongo = new MongoClient(host, port);
for (int i = 0; i < cluster.length; i++) {
stores[i] = new MongoStore(mongo.getDB(unique), cacheSizeMB);
Oak oak = new Oak(new SegmentNodeStore(stores[i]));
cluster[i] = new Jcr(oak).createRepository();
}
return cluster;
}