@Test public void shouldUpdateOneMinuteRateMetric() { double newOneMinute = INITIAL_ONE_MINUTE_RATE + 10; when(timer.getOneMinuteRate()).thenReturn(newOneMinute); timerAdapter.updateMonitorables(); assertThat(extractMonitorables(timerAdapter).get(ONE_MINUTE_RATE).get(), Matchers.<Object>is(newOneMinute)); }
@Override public void updateMonitorables() { meteredAdapter.updateMonitorables(); samplingAdapter.updateMonitorables(); }
TimerAdapter implements MetricAdapter { @Override public void updateMonitorables() { meteredAdapter.updateMonitorables(); samplingAdapter.updateMonitorables(); } }
TimerAdapter implements MetricAdapter { @Override public void updateMonitorables() { meteredAdapter.updateMonitorables(); samplingAdapter.updateMonitorables(); } TimerAdapter(Timer timer, String name, String description); }
TimerAdapter implements MetricAdapter { @Override public void updateMonitorables() { meteredAdapter.updateMonitorables(); samplingAdapter.updateMonitorables(); } TimerAdapter(Timer timer, String name, String description); @Override Set<Monitorable> getMonitorables(); @Override void updateMonitorables(); }
TimerAdapter implements MetricAdapter { @Override public void updateMonitorables() { meteredAdapter.updateMonitorables(); samplingAdapter.updateMonitorables(); } TimerAdapter(Timer timer, String name, String description); @Override Set<Monitorable> getMonitorables(); @Override void updateMonitorables();  }