Map<String, Map<String, String>> getPartitionToReplicasMapForResource(String resource) {
    ResourceInfo resourceInfo = resourceToResourceInfoMap.get(resource);
    return resourceInfo != null ? resourceInfo.getPartitionToReplicasMap() : new HashMap<>();
  }
Get partitions and their replicas to state map for a given resource. This is used in construction of external view.
@param resource resource name
@return a map of partitions to their replica infos.
ambry-clustermap/src/test/java/com/github/ambry/clustermap/MockHelixAdmin.java