LongGauge extends AbstractMonitor<Long> implements Gauge<Long>, SpectatorMonitor { public void set(Long n) { spectatorGauge.set(n); AtomicLong number = getNumber(); number.set(n); } LongGauge(MonitorConfig config); void set(Long n); AtomicLong getNumber(); @Override void initializeSpectator(TagList tags); @Override boolean equals(Object o); @Override int hashCode(); @Override Long getValue(int pollerIdx); @Override String toString();  }
@Test public void testSet() throws Exception { LongGauge gauge = newInstance("test"); gauge.set(10L); assertEquals(gauge.getValue().longValue(), 10L); }