{
replicas[i] = 3;
}
Map<String, List<ZNRecord>> currentStates = createCurrentStates(dbNames,
nodeNames, partitions, replicas);
ExternalViewGenerator provider = new ExternalViewGenerator();
List<ZNRecord> mockIdealStates = new ArrayList<ZNRecord>();
for (String dbName : dbNames)
{
ZNRecord rec = new ZNRecord(dbName);
mockIdealStates.add(rec);
}
List<ZNRecord> externalView = provider.computeExternalView(currentStates,
mockIdealStates);
Map<String, Map<String, Set<String>>> routingMap = provider
.getRouterMapFromExternalView(externalView);
verify(currentStates, routingMap);
/* write current state and external view to ZK */