@Test
  public void testReshuffleMissingDisk() throws Exception {
    generateConfigs(true, false);
    MockDataNodeId localNode = clusterMap.getDataNodes().get(0);

    Map<DiskId, List<ReplicaId>> diskToReplicaMap = new HashMap<>();
    for (ReplicaId replica : clusterMap.getReplicaIds(localNode)) {
      DiskId disk = replica.getDiskId();
      diskToReplicaMap.computeIfAbsent(disk, key -> new ArrayList<>()).add(replica);
    }

    Map<DiskId, Set<String>> disksToPartitions = new HashMap<>();
    diskToReplicaMap.forEach((diskId, replicaIds) -> {
      Set<String> partitionIds = replicaIds.stream()
          .map(replicaId -> replicaId.getPartitionId().toPathString())
          .collect(Collectors.toSet());
      disksToPartitions.put(diskId, partitionIds);
    });

    diskToReplicaMap.remove(diskToReplicaMap.keySet().iterator().next());
    ReplicaPlacementValidator placementValidator = new ReplicaPlacementValidator();
    Map<DiskId, DiskId> disksToReshuffle = placementValidator.reshuffleDisks(diskToReplicaMap, disksToPartitions);
    Assert.assertTrue(disksToReshuffle.isEmpty());
  }
Test the case when there is at least one missing disk. No reshuffling should be attempted.
@throws Exception
ambry-store/src/test/java/com/github/ambry/store/StorageManagerTest.java