### Question:
BaseSourceImpl implements BaseSource, MetricsSource { public void incGauge(String gaugeName, long delta) { MetricMutableGaugeLong gaugeInt = metricsRegistry.getLongGauge(gaugeName, 0l); gaugeInt.incr(delta); } BaseSourceImpl(
      String metricsName,
      String metricsDescription,
      String metricsContext,
      String metricsJmxContext); void init(); void setGauge(String gaugeName, long value); void incGauge(String gaugeName, long delta); void decGauge(String gaugeName, long delta); void incCounters(String key, long delta); @Override void updateHistogram(String name, long value); @Override void updateQuantile(String name, long value); void removeMetric(String key); @Override void getMetrics(MetricsBuilder metricsBuilder, boolean all); DynamicMetricsRegistry getMetricsRegistry(); String getMetricsContext(); String getMetricsDescription(); String getMetricsJmxContext(); String getMetricsName();  }### Answer:
@Test public void testIncGauge() throws Exception { String key = "testincgauge"; bmsi.incGauge(key, 100); MetricMutableGaugeLong g = (MetricMutableGaugeLong) bmsi.metricsRegistry.get(key); assertEquals(key, g.name); bmsi.incGauge(key, 10); assertSame(g, bmsi.metricsRegistry.get(key)); }