MetricRecorder implements Recorder<T> { @Override public T activeInterval() { return flipControl.active(); } MetricRecorder(T active, T inactive, FlipControl<T> flipControl, Clock clock); @Override T activeInterval(); @Override long activeIntervalStart(); @Override T captureInterval(); @Override T captureInterval(long nanotime); @Override T captureInterval(T newInterval); @Override synchronized T captureInterval(T newInterval, long nanoTime); long startRecord(); void endRecord(long permit);  }
@Test public void activeIntervalIsFromFlipControl() { when(flipControl.active()).thenReturn(active); assertEquals(active, recorder.activeInterval()); }