private static S3Client getClient() {
        var client = mock(S3Client.class);
        var response = ListBucketsResponse.builder().build();
        when(client.listBuckets(any(ListBucketsRequest.class))).thenReturn(response);
        when(client.createBucket(any(CreateBucketRequest.class))).thenReturn(CreateBucketResponse.builder().build());

        var sdkResponse = SdkHttpResponse.builder().statusCode(200).build();
        when(client.putObject(any(PutObjectRequest.class), any(RequestBody.class)))
            .thenReturn(PutObjectResponse.builder().applyMutation(r -> r.sdkHttpResponse(sdkResponse)).build());

        when(client.listObjectsV2(any(ListObjectsV2Request.class))).thenReturn(
            ListObjectsV2Response.builder()
                .contents(S3Object.builder().key(UUID.randomUUID().toString()).build())
                .build());
        when(client.getObject(any(GetObjectRequest.class))).thenReturn(
            new ResponseInputStream<>(GetObjectResponse.builder().build(), InputStream.nullInputStream()));
        return client;
    }
This is {@link SAML2S3MetadataGeneratorIT}.

@author Misagh Moayyed
@since 6.0.4
pac4j-saml/src/test/java/org/pac4j/saml/metadata/s3/SAML2S3MetadataGeneratorIT.java