private Object getHelixParticipantMetricValue(MetricRegistry metricRegistry, String className, String metricName) {
    String metricKey = metricRegistry.getGauges()
        .keySet()
        .stream()
        .filter(key -> key.startsWith(className + "." + metricName))
        .findFirst()
        .get();
    return metricRegistry.getGauges().get(metricKey).getValue();
  }
Get value of a certain metric which starts with given keywords.
@param metricRegistry the {@link MetricRegistry} to use.
@param className the name of class that metric associates with.
@param metricName the keywords of metric name.
@return value of found metric.
ambry-clustermap/src/test/java/com/github/ambry/clustermap/AmbryStateModelFactoryTest.java