### Question:
MicrometerRegistry implements Registry { @Override public Counter counter(Id id) { return new MicrometerCounter(id, impl.counter(id.name(), convert(id.tags()))); } MicrometerRegistry(MeterRegistry impl); @Override Clock clock(); @Override Id createId(String name); @Override Id createId(String name, Iterable<Tag> tags); @Override void register(Meter meter); @Override ConcurrentMap<Id, Object> state(); @Override Counter counter(Id id); @Override DistributionSummary distributionSummary(Id id); @Override Timer timer(Id id); @Override Gauge gauge(Id id); @Override Gauge maxGauge(Id id); @Override Meter get(Id id); @Override Iterator<Meter> iterator();  }### Answer:
@Test public void counterIncrement() { Counter c = registry.counter("foo"); Assertions.assertEquals(0, c.count()); c.increment(); Assertions.assertEquals(1, c.count()); }
@Test public void counterAdd() { Counter c = registry.counter("foo"); Assertions.assertEquals(0.0, c.actualCount(), 1e-12); c.add(1.5); Assertions.assertEquals(1.5, c.actualCount(), 1e-12); }
@Test public void counterMeasure() { Counter c = registry.counter("foo"); c.increment(); int i = 0; for (Measurement m : c.measure()) { ++i; Assertions.assertEquals("foo", m.id().name()); Assertions.assertEquals(1.0, m.value(), 1e-12); } Assertions.assertEquals(1, i); }