@Override
  public List<ReplicaId> getReplicaIds(DataNodeId dataNodeId) {
    List<ReplicaId> mergedReplicas = new ArrayList<>();
    for (ReplicaId staticReplica : staticClusterManager.getReplicaIds(dataNodeId)) {
      AmbryPartition partitionId = (AmbryPartition) getHelixPartition(staticReplica);
      if (partitionId == null) {
        throw new IllegalStateException(String.format("No partition %s not found in helix clustermap",
            staticReplica.getPartitionId().toPathString()));
      }
      Partition partition = (Partition) staticReplica.getPartitionId();
      Partition compositePartition =
          new Partition(Long.parseLong(partitionId.toPathString()), partition.getPartitionClass(),
              partition.getPartitionState(), partition.getReplicaCapacityInBytes());
      for (ReplicaId replicaId : partitionId.getReplicaIds()) {
        compositePartition.addReplica(replicaId);
      }
      Replica compositeReplica = new Replica(compositePartition, (Disk) staticReplica.getDiskId(),
          ((Replica) staticReplica).getClusterMapConfig());
      compositePartition.addReplica(compositeReplica);
      mergedReplicas.add(compositeReplica);
    }
    return mergedReplicas;
  }
Get the list of {@link ReplicaId}s associated with the given {@link DataNodeId} in the underlying
{@link StaticClusterManager}. The list of {@link ReplicaId}s is obtained by merging replica lists from
{@link HelixClusterManager} and {@link StaticClusterManager}.
@param dataNodeId the {@link DataNodeId} for which the replicas are to be listed.
@return merged list of {@link ReplicaId}s as present in the underlying {@link StaticClusterManager} and
{@link HelixClusterManager} for the given node.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/RecoveryTestClusterManager.java