SyncSender extends AbstractSender { @Override public void close() throws IOException { getConnection().disconnect(); } SyncSender(Builder builder); @Override Response doSend(Payload payload); @Override void close(); static final String DEFAULT_API_ENDPOINT; }
@Test public void shouldClose() throws Exception { sut.close(); verify(connection).disconnect(); }