### Question:
ServoGauge extends AbstractMonitor<Double> implements Gauge, ServoMeter, NumericMonitor<Double> { @Override public Iterable<Measurement> measure() { long now = clock.wallTime(); return Collections.singleton(new Measurement(id(), now, value.get())); } ServoGauge(Id id, Clock clock, MonitorConfig config); @Override Id id(); @Override boolean hasExpired(); @Override Iterable<Measurement> measure(); @Override void set(double v); @Override double value(); @Override Double getValue(int pollerIndex); @Override void addMonitors(List<Monitor<?>> monitors);  }### Answer:
@Test public void measure() { final ServoRegistry r = Servo.newRegistry(clock); Gauge g = r.gauge(r.createId("foo")); g.set(1.0); Iterator<Measurement> ms = g.measure().iterator(); Assertions.assertTrue(ms.hasNext()); Measurement m = ms.next(); Assertions.assertFalse(ms.hasNext()); Assertions.assertEquals("foo", m.id().name()); Assertions.assertEquals(1.0, 1.0, 1e-12); }