DurationTimer extends AbstractMonitor<Long> implements CompositeMonitor<Long> { @Override public List<Monitor<?>> getMonitors() { return monitors; } DurationTimer(MonitorConfig config);  DurationTimer(MonitorConfig config, final Clock clock); @Override Long getValue(); @Override Long getValue(int pollerIndex); @Override List<Monitor<?>> getMonitors(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); Stopwatch start();  }
@Test public void testGetMonitors() throws Exception { List<Monitor<?>> monitors = ((CompositeMonitor<?>) newInstance("test")).getMonitors(); assertEquals(monitors.size(), 2); Monitor<Long> duration = getDuration(monitors); Monitor<Long> activeTasks = getActiveTasks(monitors); assertEquals(duration.getConfig().getName(), "test.duration"); assertEquals(activeTasks.getConfig().getName(), "test.activeTasks"); assertEquals(duration.getValue().longValue(), 0L); assertEquals(activeTasks.getValue().longValue(), 0L); }