### Question:
BaseSourceImpl implements BaseSource, MetricsSource { public void removeMetric(String key) { metricsRegistry.removeMetric(key); JmxCacheBuster.clearJmxCache(); } 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 testRemoveMetric() throws Exception { bmsi.setGauge("testrm", 100); bmsi.removeMetric("testrm"); assertNull(bmsi.metricsRegistry.get("testrm")); }