static ReplicaId getAnyReplica(BlobId blobId, boolean fromLocal, String localDcName) {
    ReplicaId replicaToReturn = null;
    for (ReplicaId replicaId : blobId.getPartition().getReplicaIds()) {
      if (fromLocal && replicaId.getDataNodeId().getDatacenterName().equals(localDcName)) {
        replicaToReturn = replicaId;
        break;
      }
      if (!fromLocal && !replicaId.getDataNodeId().getDatacenterName().equals(localDcName)) {
        replicaToReturn = replicaId;
        break;
      }
    }
    return replicaToReturn;
  }
Get any of the replicas from local DC or remote DC (based on the given parameter).
@param blobId the id of blob that sits on the replica
@param fromLocal whether to get replica from local datacenter
@param localDcName the name of local datacenter
@return any {@link ReplicaId} that satisfies requirement
ambry-router/src/test/java/com/github/ambry/router/RouterTestHelpers.java