class S3Client {

  List<String> deleteObjects(String bucket, List<String> keys) {
    if (keys.isEmpty()) {
      return Collections.emptyList();
    }
    if (!dryRunEnabled) {
      keys.forEach(key -> log.info("Deleting: \"{}/{}\"", bucket, key));
      DeleteObjectsRequest deleteObjectsRequest = new DeleteObjectsRequest(bucket)
        .withKeys(keys.toArray(new String[]{}));
      DeleteObjectsResult deleteObjectsResult = amazonS3.deleteObjects(deleteObjectsRequest);
      return deleteObjectsResult.getDeletedObjects()
          .stream()
          .map(DeleteObjectsResult.DeletedObject::getKey)
          .collect(Collectors.toList());
    } else {
      return keys.stream()
          .peek(key -> log.info("Dry run - deleting: \"{}/{}\"", bucket, key))
          .collect(Collectors.toList());
    }
  }

  public  S3Client(AmazonS3 amazonS3, boolean dryRunEnabled);

}