### Question:
DoubleCounter extends AbstractMonitor<Number> implements NumericMonitor<Number> { @Override public Number getValue(int pollerIndex) { final Long dp = count.poll(pollerIndex); final double stepSeconds = ServoPollers.POLLING_INTERVALS[pollerIndex] / 1000.0; return (dp == null) ? Double.NaN : Double.longBitsToDouble(dp) / stepSeconds; } DoubleCounter(MonitorConfig config);   DoubleCounter(MonitorConfig config, Clock clock); @Override Number getValue(int pollerIndex); @Override String toString();  }### Answer:
@Test public void testInitialPollIsZero() { clock.set(time(1)); DoubleCounter c = newInstance("foo"); Assertions.assertEquals(0.0, c.getValue(1).doubleValue(), DELTA); }
@Test public void testHasRightType() throws Exception { Assertions.assertEquals(newInstance("foo").getConfig().getTags().getValue(DataSourceType.KEY), "NORMALIZED"); }