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