@Test public void testSingleDataCenterHost() { UUID hostId = UUID.fromString("f4678229-61eb-4a06-9db6-49e116c8ece0"); Host host = mockHost("DC1", hostId); RepairResource repairResourceVnode = new RepairResource("DC1", hostId.toString()); ReplicaRepairGroup replicaRepairGroup = generateReplicaRepairGroup(host); RepairResourceFactory repairResourceFactory = new VnodeRepairResourceFactory(); assertThat(repairResourceFactory.getRepairResources(replicaRepairGroup)).containsExactly(repairResourceVnode); }
@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);  }