@Test
  public void testRemoveMetric() throws Exception {
    bmsi.setGauge("testrmgauge", 100);
    bmsi.removeMetric("testrmgauge");
    assertNull(bmsi.metricsRegistry.get("testrmgauge"));
  }
Test of default BaseSource for hadoop 2
hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/metrics/TestBaseSourceImpl.java