TimeWindowCounterBuilder { public CompositeCounter build(String baseName, String baseDescription, Unit<?> unit) { List<Counter> counters = getSubCounters(baseName, baseDescription, unit); return new CompositeCounter(counters); } 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 metricsShouldBeCreatedWithProvidedValues() { builder.build("mails.sent", "emails sent", ONE); assertTrue(registry.containsMetric("mails.sent.5s")); assertEquals("emails sent [5s]", registry.getMetric("mails.sent.5s").getDescription()); assertEquals(ONE, registry.getMetric("mails.sent.5s").getUnit()); }