private static void deleteBucket(final S3Client s3Client) {
        try {
            val objects = s3Client.listObjectsV2(ListObjectsV2Request.builder().bucket(BUCKET_NAME).build());
            objects.contents().forEach(object -> s3Client.deleteObject(DeleteObjectRequest.builder().bucket(BUCKET_NAME).key(object.key()).build()));
            s3Client.deleteBucket(DeleteBucketRequest.builder().bucket(BUCKET_NAME).build());
        } catch (final Exception e) {
            LOGGER.trace(e.getMessage());
        }
    }
This is {@link CasAmazonS3BucketsCloudConfigBootstrapAutoConfigurationTests}.

@author Misagh Moayyed
@since 6.0.0
support/cas-server-support-configuration-cloud-aws-s3/src/test/java/org/apereo/cas/CasAmazonS3BucketsCloudConfigBootstrapAutoConfigurationTests.java