MinGauge extends AbstractMonitor<Long> implements Gauge<Long> { public void update(long v) { for (int i = 0; i < Pollers.NUM_POLLERS; ++i) { updateMin(i, v); } } MinGauge(MonitorConfig config);   MinGauge(MonitorConfig config, Clock clock); void update(long v); @Override Long getValue(int pollerIdx); long getCurrentValue(int nth); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }
@Test public void testUpdate() throws Exception { clock.set(0L); MinGauge minGauge = newInstance("min1"); minGauge.update(42L); clock.set(60000L); assertEquals(minGauge.getValue().longValue(), 42L); }