NoopMeterRegistry extends MeterRegistry { @Override protected Meter newMeter(Meter.Id id, Meter.Type type, Iterable<Measurement> measurements) { return new NoopMeter(id); } NoopMeterRegistry(); private  NoopMeterRegistry(Clock clock);   }
@Test public void newMeter_createsNoopMeter() { Id expectedId = new Id("name", Tags.of("key", "value"), null, null, OTHER); Meter result = noopMeterRegistry.newMeter(expectedId, OTHER, emptyList()); assertThat(result) .isInstanceOf(NoopMeter.class); assertThat(result.getId()) .isEqualTo(expectedId); }