public void setPermanentMetricRegistry(MetricRegistry toSet) {
    metricRegistry = toSet;
    createNewRegistry = false;
  }
Set the registry as {@code toSet} ensure that this is the one that is returned by {@link #getMetricRegistry()}
@param toSet the metric registry to set to.
ambry-test-utils/src/main/java/com/github/ambry/clustermap/MockClusterMap.java