### Question:
OperationMonitor { double getAverageRate() { return rateWindow.getAverageRate(); } OperationMonitor(); private  OperationMonitor(final RateTimer timer);   OperationMonitor(final RateTimer timer, final RateWindow rateWindow);   }### Answer:
@Test public void shouldGetAverageRate() { final double SOLUTION = 5D; given(rateWindow.getAverageRate()).willReturn(SOLUTION); double rate = operationMonitor.getAverageRate(); assertEquals(rate, SOLUTION); }