### Question:
CompositeRegistry implements Registry { @Override public void register(Meter meter) { PolledMeter.monitorMeter(this, meter); } CompositeRegistry(Clock clock); void add(Registry registry); void remove(Registry registry); void removeAll(); @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 testRegister() { Registry r = newRegistry(5, true); Counter c = new DefaultCounter(clock, r.createId("foo")); r.register(c); c.increment(); Assertions.assertEquals(c.count(), 1L); r.register(c); PolledMeter.update(r); Meter meter = r.get(c.id()); for (Measurement m : meter.measure()) { Assertions.assertEquals(m.value(), 2.0, 1e-12); } }