NoopMeterRegistry extends MeterRegistry { @Override protected Timer newTimer(Meter.Id id, DistributionStatisticConfig distributionStatisticConfig, PauseDetector pauseDetector) { return new NoopTimer(id); } NoopMeterRegistry(); private  NoopMeterRegistry(Clock clock);   }
@Test public void newTimer_createsNoopTimer() { Id expectedId = new Id("name", Tags.of("key", "value"), null, null, TIMER); Timer result = noopMeterRegistry.newTimer(expectedId, DistributionStatisticConfig.NONE, new NoPauseDetector()); assertThat(result) .isInstanceOf(NoopTimer.class); assertThat(result.getId()) .isEqualTo(expectedId); }