NoopMeterRegistry extends MeterRegistry { @Override protected Counter newCounter(Meter.Id id) { return new NoopCounter(id); } NoopMeterRegistry(); private  NoopMeterRegistry(Clock clock);   }
@Test public void newCounter_createsNoopCounter() { Id expectedId = new Id("name", Tags.of("key", "value"), null, null, COUNTER); Counter result = noopMeterRegistry.newCounter(expectedId); assertThat(result) .isInstanceOf(NoopCounter.class); assertThat(result.getId()) .isEqualTo(expectedId); }