DerivativeGauge implements Gauge<T> { @Override public T getValue() { T result = transform(base.getValue()); lastUpdate = System.currentTimeMillis(); return result; } protected  DerivativeGauge(Gauge<F> base); @Override T getValue(); @Override long lastUpdateTime();  }
@Test public void returnsATransformedValue() throws Exception { assertThat(gauge2.getValue()) .isEqualTo(3); }