@Test void close() { S3Client s3Client = mock(S3Client.class); S3ClientBuilder s3ClientBuilder = mock(S3ClientBuilder.class); doReturn(s3Client).when(s3ClientBuilder).build(); AwsS3Sender sender = new AwsS3Sender(s3ClientBuilder); sender.close(); verify(s3Client, times(1)).close(); }
@Override public void close() { client.close(); }
AwsS3Sender implements Closeable, Sender { @Override public void close() { client.close(); } }
AwsS3Sender implements Closeable, Sender { @Override public void close() { client.close(); } AwsS3Sender(S3ClientBuilder s3ClientBuilder);  AwsS3Sender(S3ClientBuilder s3ClientBuilder, Config config); }
AwsS3Sender implements Closeable, Sender { @Override public void close() { client.close(); } AwsS3Sender(S3ClientBuilder s3ClientBuilder);  AwsS3Sender(S3ClientBuilder s3ClientBuilder, Config config); int getRetryInternalMs(); int getMaxRetryInternalMs(); float getRetryFactor(); int getRetryMax(); int getWorkBufSize(); void send(String bucket, String key, ByteBuffer dataBuffer); @Override void close(); }
AwsS3Sender implements Closeable, Sender { @Override public void close() { client.close(); } AwsS3Sender(S3ClientBuilder s3ClientBuilder);  AwsS3Sender(S3ClientBuilder s3ClientBuilder, Config config); int getRetryInternalMs(); int getMaxRetryInternalMs(); float getRetryFactor(); int getRetryMax(); int getWorkBufSize(); void send(String bucket, String key, ByteBuffer dataBuffer); @Override void close();  }