static void abortMultipartUploadsUsingLifecycleConfig() {
        Collection<LifecycleRule> lifeCycleRules = List.of(LifecycleRule.builder()
                .abortIncompleteMultipartUpload(b -> b.
                        daysAfterInitiation(7))
                .status("Enabled")
                .filter(SdkBuilder::build) // Filter element is required.
                .build());

        // If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
        PutBucketLifecycleConfigurationResponse response = s3Client.putBucketLifecycleConfiguration(b -> b
                .bucket(bucketName)
                .lifecycleConfiguration(b1 -> b1.rules(lifeCycleRules)));

        if (response.sdkHttpResponse().isSuccessful()) {
            logger.info("Rule to abort incomplete multipart uploads added to bucket.");
        } else {
            logger.error("Unsuccessfully applied rule. HTTP status code is [{}]", response.sdkHttpResponse().statusCode());
        }
    }
@Test
    @Tag("IntegrationTest")
    void testAbortMultipartUploadsUsingLifecycleConfigHasRule(){
        AbortMultipartUploadExamples.abortMultipartUploadsUsingLifecycleConfig();
        GetBucketLifecycleConfigurationResponse response = AbortMultipartUploadExamples.s3Client.getBucketLifecycleConfiguration(b -> b
                .bucket(AbortMultipartUploadExamples.bucketName));
        assertEquals(7, (int) response.rules().get(0).abortIncompleteMultipartUpload().daysAfterInitiation());
    }