public void metricRemoval(KafkaMetric metric) {
        ledger.metricRemoval(metric);
    }
@Test
    public void testMetricRemoval() {
        metrics.addMetric(metricName, (config, now) -> 100.0);

        collector.collect(testEmitter);
        assertEquals(2, testEmitter.emittedMetrics().size());

        metrics.removeMetric(metricName);
        assertFalse(collector.getTrackedMetrics().contains(metricNamingStrategy.metricKey(metricName)));

        // verify that the metric was removed.
        testEmitter.reset();
        collector.collect(testEmitter);
        List<SinglePointMetric> collected = testEmitter.emittedMetrics();
        assertEquals(1, collected.size());
        assertEquals("test.domain.kafka.count.count", collected.get(0).builder().build().getName());
    }