@Test
public void reportsHistogramValues() throws Exception {

    final Histogram histogram = mock(Histogram.class);
    when(histogram.getCount()).thenReturn(1L);
    final Snapshot snapshot = mock(Snapshot.class);
    when(snapshot.getMax()).thenReturn(2L);
    when(snapshot.getMean()).thenReturn(3.0);
    when(snapshot.getMin()).thenReturn(4L);
    when(snapshot.getStdDev()).thenReturn(5.0);
    when(snapshot.getMedian()).thenReturn(6.0);
    when(snapshot.get75thPercentile()).thenReturn(7.0);
    when(snapshot.get95thPercentile()).thenReturn(8.0);
    when(snapshot.get98thPercentile()).thenReturn(9.0);
    when(snapshot.get99thPercentile()).thenReturn(10.0);
    when(snapshot.get999thPercentile()).thenReturn(11.0);
    when(histogram.getSnapshot()).thenReturn(snapshot);
    reporter.report(this.<Gauge>map(),
            this.<Counter>map(),
            map("test.histogram", histogram),
            this.<Meter>map(),
            this.<Timer>map());
    Assertions.assertThat(consoleOutput())
            .isEqualTo(lines(
                    dateHeader,
                    "",
                    "-- Histograms ------------------------------------------------------------------",
                    "test.histogram",
                    "             count = 1",
                    "               min = 4",
                    "               max = 2",
                    "              mean = 3.00",
                    "            stddev = 5.00",
                    "            median = 6.00",
                    "              75% <= 7.00",
                    "              95% <= 8.00",
                    "              98% <= 9.00",
                    "              99% <= 10.00",
                    "            99.9% <= 11.00",
                    "",
                    ""
            ));
}