@Override
    public Counter counter(String name) {
        return NoopCounter.INSTANCE;
    }
@Test
    public void accessingACustomCounterRegistersAndReusesTheCounter() {
        final MetricRegistry.MetricSupplier<Counter> supplier = () -> counter;
        final Counter counter1 = registry.counter("thing", supplier);
        final Counter counter2 = registry.counter("thing", supplier);

        assertThat(counter1).isExactlyInstanceOf(NoopMetricRegistry.NoopCounter.class);
        assertThat(counter2).isExactlyInstanceOf(NoopMetricRegistry.NoopCounter.class);
        assertThat(counter1).isSameAs(counter2);

        verify(listener, never()).onCounterAdded("thing", counter1);
    }