### Question:
AtlasGauge extends AtlasMeter implements Gauge { @Override public void set(double v) { value.set(v); updateLastModTime(); } AtlasGauge(Registry registry, Id id, Clock clock, long ttl); @Override void set(double v); @Override double value();  }### Answer:
@Test public void set() { gauge.set(42); checkValue(42); clock.setWallTime(step + 1); checkValue(42); }
@Test public void rollForward() { gauge.set(42); clock.setWallTime(step + 1); checkValue(42); clock.setWallTime(step + step + 1); checkValue(42); }
@Test public void expiration() { long start = clock.wallTime(); clock.setWallTime(start + step * 2); Assertions.assertTrue(gauge.hasExpired()); gauge.set(1); Assertions.assertFalse(gauge.hasExpired()); clock.setWallTime(start + step * 3 + 1); Assertions.assertTrue(gauge.hasExpired()); gauge.set(1); Assertions.assertFalse(gauge.hasExpired()); }