BasicGauge extends AbstractMonitor<T> implements Gauge<T>, SpectatorMonitor { @Override public T getValue(int pollerIndex) { try { return function.call(); } catch (Exception e) { throw Throwables.propagate(e); } } BasicGauge(MonitorConfig config, Callable<T> function); @Override T getValue(int pollerIndex); @Override void initializeSpectator(TagList tags); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }
@Test public void testGetValue() throws Exception { BasicGauge<Long> c = newInstance("42"); assertEquals(c.getValue().longValue(), 42L); }