@Override
  public List<? extends ReplicaId> getReplicaIds(DataNodeId dataNodeId) {
    if (exceptionToThrow != null) {
      throw exceptionToThrow;
    }
    List<ReplicaId> replicaIdsToReturn = new ArrayList<ReplicaId>();
    for (PartitionId partitionId : partitions) {
      List<? extends ReplicaId> replicaIds = partitionId.getReplicaIds();
      for (ReplicaId replicaId : replicaIds) {
        if (replicaId.getDataNodeId().getHostname().equals(dataNodeId.getHostname())
            && replicaId.getDataNodeId().getPort() == dataNodeId.getPort()) {
          replicaIdsToReturn.add(replicaId);
        }
      }
    }
    return replicaIdsToReturn;
  }
Implementation of {@link ClusterMap} that has well known structure and can provide peer lists via the
{@link #getPeers(String)} method for verification.
<p/>
Can also throw exceptions on demand.
ambry-frontend/src/test/java/com/github/ambry/frontend/GetPeersHandlerTest.java