@Test public void shouldUpdateCountMetric() { long newCount = INITIAL_COUNT + 10; when(timer.getCount()).thenReturn(newCount); timerAdapter.updateMonitorables(); assertThat(extractMonitorables(timerAdapter).get(COUNT).get(), Matchers.<Object>is(newCount)); }
@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();  }