@Test
  public void testDecGauge() throws Exception {
    bmsi.decGauge("testdec", 100);
    assertEquals(-100, ((MutableGaugeLong) bmsi.metricsRegistry.get("testdec")).value());
    bmsi.decGauge("testdec", 100);
    assertEquals(-200, ((MutableGaugeLong) bmsi.metricsRegistry.get("testdec")).value());

  }
Test of default BaseSource for hadoop 2
hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/metrics/TestBaseSourceImpl.java