@AfterClass
  public static void cleanup() {
    try {
      MetricsFactory.close();
    } catch (Exception e) {
      e.printStackTrace();
    }
    jsonReportFile.delete();
  }
Unit test for new Metrics subsystem.
standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/common/metrics/metrics2/TestCodahaleMetrics.java