@Test
public void reportsMeters() throws Exception {

    final Meter meter = mock(Meter.class);
    when(meter.getCount()).thenReturn(1L);
    when(meter.getOneMinuteRate()).thenReturn(2.0);
    when(meter.getFiveMinuteRate()).thenReturn(3.0);
    when(meter.getFifteenMinuteRate()).thenReturn(4.0);
    when(meter.getMeanRate()).thenReturn(5.0);
    reporter.report(map(),
        map(),
        map(),
        map("meter", meter),
        map());
    final InOrder inOrder = inOrder(graphite);
    inOrder.verify(graphite).connect();
    inOrder.verify(graphite).send("prefix.meter.count", "1", timestamp);
    inOrder.verify(graphite).send("prefix.meter.m1_rate", "2.00", timestamp);
    inOrder.verify(graphite).send("prefix.meter.m5_rate", "3.00", timestamp);
    inOrder.verify(graphite).send("prefix.meter.m15_rate", "4.00", timestamp);
    inOrder.verify(graphite).send("prefix.meter.mean_rate", "5.00", timestamp);
    inOrder.verify(graphite).flush();
    inOrder.verify(graphite).close();
    verifyNoMoreInteractions(graphite);
}