TimeWindowCounterBuilder { public CompositeCounter wrapCounter(MonitoredCounter templateCounter) { List<Counter> subCounters = Lists .<Counter> newArrayList(templateCounter); subCounters.addAll(getSubCounters(templateCounter.getName(), templateCounter.getDescription(), templateCounter.getUnit())); return new CompositeCounter(subCounters); } TimeWindowCounterBuilder(MonitorableRegistry registry,
			TimeWindow... windows);   TimeWindowCounterBuilder(Supplier<Long> timeSource,
			MonitorableRegistry registry, TimeWindow... windows); CompositeCounter build(String baseName, String baseDescription,
			Unit<?> unit); CompositeCounter copyFrom(MonitoredCounter templateCounter); CompositeCounter wrapCounter(MonitoredCounter templateCounter);  }
@Test public void wrappedCounterShouldIncrementOriginalWhenIncremented() { CompositeCounter wrapped = builder.wrapCounter(template); wrapped.inc(23); assertEquals(Long.valueOf(23L), template.get()); PollingMonitoredValue.runAllTasks(); assertEquals(Long.valueOf(23L), registry.getMetric("disk.writes.5s").get()); }