@Test public void testMultipleDataCenterHosts() { UUID hostId = UUID.fromString("f4678229-61eb-4a06-9db6-49e116c8ece0"); UUID hostId2 = UUID.fromString("1dbe1c4f-81a8-426b-b599-cfcc26fca224"); Host host = mockHost("DC1", hostId); Host host2 = mockHost("DC2", hostId2); RepairResource repairResourceVnodeDc1 = new RepairResource("DC1", hostId.toString()); RepairResource repairResourceVnodeDc2 = new RepairResource("DC2", hostId2.toString()); ReplicaRepairGroup replicaRepairGroup = generateReplicaRepairGroup(host, host2); RepairResourceFactory repairResourceFactory = new VnodeRepairResourceFactory(); assertThat(repairResourceFactory.getRepairResources(replicaRepairGroup)).containsExactlyInAnyOrder(repairResourceVnodeDc1, repairResourceVnodeDc2); }
@Override public Set<RepairResource> getRepairResources(ReplicaRepairGroup replicaRepairGroup) { return replicaRepairGroup.getReplicas().stream() .map(this::replicaToRepairResource) .collect(Collectors.toSet()); }
VnodeRepairResourceFactory implements RepairResourceFactory { @Override public Set<RepairResource> getRepairResources(ReplicaRepairGroup replicaRepairGroup) { return replicaRepairGroup.getReplicas().stream() .map(this::replicaToRepairResource) .collect(Collectors.toSet()); } }
VnodeRepairResourceFactory implements RepairResourceFactory { @Override public Set<RepairResource> getRepairResources(ReplicaRepairGroup replicaRepairGroup) { return replicaRepairGroup.getReplicas().stream() .map(this::replicaToRepairResource) .collect(Collectors.toSet()); }  }
VnodeRepairResourceFactory implements RepairResourceFactory { @Override public Set<RepairResource> getRepairResources(ReplicaRepairGroup replicaRepairGroup) { return replicaRepairGroup.getReplicas().stream() .map(this::replicaToRepairResource) .collect(Collectors.toSet()); }  @Override Set<RepairResource> getRepairResources(ReplicaRepairGroup replicaRepairGroup); }
VnodeRepairResourceFactory implements RepairResourceFactory { @Override public Set<RepairResource> getRepairResources(ReplicaRepairGroup replicaRepairGroup) { return replicaRepairGroup.getReplicas().stream() .map(this::replicaToRepairResource) .collect(Collectors.toSet()); }  @Override Set<RepairResource> getRepairResources(ReplicaRepairGroup replicaRepairGroup);  }