@Override
    public Object getValue() {
      return gaugeVal;
    }
Test JSON reporter.
<ul>
  <li>increment the counter value</li>
  <li>wait a bit for the new repor to be written</li>
  <li>read the value from JSON file</li>
  <li>verify that the value matches expectation</li>
</ul>
This check is repeated a few times to verify that the values are updated over time.
@throws Exception if fails to read counter value
standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/common/metrics/metrics2/TestCodahaleMetrics.java