Graphite implements GraphiteSender { @Override public int getFailures() { return failures; } Graphite(String hostname, int port);  Graphite(String hostname, int port, SocketFactory socketFactory);  Graphite(String hostname, int port, SocketFactory socketFactory, Charset charset);  Graphite(InetSocketAddress address);  Graphite(InetSocketAddress address, SocketFactory socketFactory);  Graphite(InetSocketAddress address, SocketFactory socketFactory, Charset charset); @Override void connect(); @Override boolean isConnected(); @Override void send(String name, String value, long timestamp); @Override int getFailures(); @Override void flush(); @Override void close();  }
@Test public void measuresFailures() { graphite = new Graphite(address, socketFactory); assertThat(graphite.getFailures()) .isZero(); }