### Question:
DataCenterRepairResourceFactory implements RepairResourceFactory { @Override public Set<RepairResource> getRepairResources(ReplicaRepairGroup replicaRepairGroup) { return replicaRepairGroup.getDataCenters().stream() .map(this::dataCenterToRepairResource) .collect(Collectors.toSet()); }  @Override Set<RepairResource> getRepairResources(ReplicaRepairGroup replicaRepairGroup);  }### Answer:
@Test public void testSingleDataCenter() { Host host = mockHost("DC1"); RepairResource repairResourceDc1 = new RepairResource("DC1", "DC1"); ReplicaRepairGroup replicaRepairGroup = generateReplicaRepairGroup(host); RepairResourceFactory repairResourceFactory = new DataCenterRepairResourceFactory(); assertThat(repairResourceFactory.getRepairResources(replicaRepairGroup)).containsExactly(repairResourceDc1); }
@Test public void testMultipleDataCenters() { Host host = mockHost("DC1"); Host host2 = mockHost("DC2"); RepairResource repairResourceDc1 = new RepairResource("DC1", "DC1"); RepairResource repairResourceDc2 = new RepairResource("DC2", "DC2"); ReplicaRepairGroup replicaRepairGroup = generateReplicaRepairGroup(host, host2); RepairResourceFactory repairResourceFactory = new DataCenterRepairResourceFactory(); assertThat(repairResourceFactory.getRepairResources(replicaRepairGroup)).containsExactlyInAnyOrder(repairResourceDc1, repairResourceDc2); }