void assertStateCount(List<String> states, List<Integer> counts, MetricRegistry metricRegistry) {
    assertEquals(states.size(), counts.size());
    for (int i = 0; i < states.size(); i++) {
      String state = states.get(i);
      int count = counts.get(i);
      assertEquals(state + " count should be " + count, count,
          getHelixParticipantMetricValue(metricRegistry, HelixParticipant.class.getName(), state + "PartitionCount"));
    }
  }
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