FluentdIngester implements Ingester { @Override public void close() throws IOException { sender.close(); } FluentdIngester(FluentdSender sender);  FluentdIngester(Config config, FluentdSender sender); @Override void ingest(String tag, ByteBuffer dataBuffer); @Override Sender getSender(); boolean isAckResponseMode(); @Override void close();  }
@Test void close() throws IOException { Ingester ingester = new FluentdIngester(new FluentdIngester.Config(), fluentdSender); ingester.close(); verify(fluentdSender, times(1)).close(); }