@Test public void shouldUpdateMedianMetric() { double newMedian = INITIAL_MEDIAN + 10; when(snapshot.getMedian()).thenReturn(newMedian); histogramAdapter.updateMonitorables(); assertThat(extractMonitorables(histogramAdapter).get(MEDIAN).get(), Matchers.<Object>is(newMedian)); }
@Override public void updateMonitorables() { samplingAdapter.updateMonitorables(); countingAdapter.updateMonitorables(); }
HistogramAdapter implements MetricAdapter { @Override public void updateMonitorables() { samplingAdapter.updateMonitorables(); countingAdapter.updateMonitorables(); } }
HistogramAdapter implements MetricAdapter { @Override public void updateMonitorables() { samplingAdapter.updateMonitorables(); countingAdapter.updateMonitorables(); } HistogramAdapter(Histogram histogram, String name, String description, Unit<?> unit);  HistogramAdapter(Histogram histogram, String name, String description); }
HistogramAdapter implements MetricAdapter { @Override public void updateMonitorables() { samplingAdapter.updateMonitorables(); countingAdapter.updateMonitorables(); } HistogramAdapter(Histogram histogram, String name, String description, Unit<?> unit);  HistogramAdapter(Histogram histogram, String name, String description); @Override Set<Monitorable> getMonitorables(); @Override void updateMonitorables(); }
HistogramAdapter implements MetricAdapter { @Override public void updateMonitorables() { samplingAdapter.updateMonitorables(); countingAdapter.updateMonitorables(); } HistogramAdapter(Histogram histogram, String name, String description, Unit<?> unit);  HistogramAdapter(Histogram histogram, String name, String description); @Override Set<Monitorable> getMonitorables(); @Override void updateMonitorables();  }