@Override
  public <T> PinotGauge<T> newGauge(PinotMetricName name, final PinotGauge<T> gauge) {
    final String metricName = name.getMetricName().toString();
    return (gauge == null) ? new DropwizardGauge<T>((DropwizardSettableGauge) _metricRegistry.gauge(metricName))
        : new DropwizardGauge<T>(_metricRegistry.gauge(metricName, () -> (DropwizardSettableGauge) gauge.getGauge()));
  }
@Test
  public void testNewGauge() {
    DropwizardMetricsRegistry dropwizardMetricsRegistry = new DropwizardMetricsRegistry();
    DropwizardSettableGauge<Long> dropwizardSettableGauge = new DropwizardSettableGauge<>(1L);
    DropwizardGauge<Long> dropwizardGauge = new DropwizardGauge<>(dropwizardSettableGauge);
    PinotGauge<Long> pinotGauge = dropwizardMetricsRegistry.newGauge(new DropwizardMetricName("test"), dropwizardGauge);
    Assert.assertEquals(pinotGauge.value(), Long.valueOf(1L));
    pinotGauge = dropwizardMetricsRegistry.newGauge(new DropwizardMetricName("test"), null);
    Assert.assertEquals(pinotGauge.value(), Long.valueOf(1L));
  }