assertEquals(receivedUnique.size(), expectedOwners);
// Check the number of machines
Set<String> receivedMachines = new HashSet<String>();
for (Address a : received) {
TopologyAwareAddress taa = (TopologyAwareAddress) a;
receivedMachines.add(taa.getMachineId() + "|" + taa.getRackId() + "|" + taa.getSiteId());
}
assertEquals(receivedMachines.size(), expectedMachines);
// Check the number of racks
Set<String> receivedRacks = new HashSet<String>();
for (Address a : received) {
TopologyAwareAddress taa = (TopologyAwareAddress) a;
receivedRacks.add(taa.getRackId() + "|" + taa.getSiteId());
}
assertEquals(receivedRacks.size(), expectedRacks);
// Check the number of sites
Set<String> receivedSites = new HashSet<String>();