private void testMetric(Scan scan, String metricKey, long expectedValue) throws Exception {
    testMetric(scan, metricKey, expectedValue, CompareOperator.EQUAL);
  }
Run the scan to completetion and check the metric against the specified value
@param scan          The scan instance to use to record metrics
@param metricKey     The metric key name
@param expectedValue The expected value of metric
@throws Exception on unexpected failure
hbase-server/src/test/java/org/apache/hadoop/hbase/TestServerSideScanMetricsFromClientSide.java