@Test(expected = IllegalArgumentException.class)
  public void testMissingDenominatorRatio() throws Exception {
    MetricsFactory.getInstance().addRatio("rat", new NumericVariable(5), null);
  }
Unit test for the RatioGauge implementation.
standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/common/metrics/metrics2/TestMetricVariableRatioGauge.java