@Override
    public void stop() {
        try {
            super.stop();
        } finally {
            try {
                graphite.close();
            } catch (IOException e) {
                LOGGER.debug("Error disconnecting from Graphite", graphite, e);
            }
        }
    }
@Test
    public void closesConnectionOnReporterStop() throws Exception {
        reporter.stop();

        final InOrder inOrder = inOrder(graphite);
        inOrder.verify(graphite).connect();
        inOrder.verify(graphite).flush();
        inOrder.verify(graphite, times(2)).close();

        verifyNoMoreInteractions(graphite);
    }