diff --git a/optout/src/test/java/gov/cms/ab2d/optout/S3MockAPIExtension.java b/optout/src/test/java/gov/cms/ab2d/optout/S3MockAPIExtension.java index 3c93549..df9eeec 100644 --- a/optout/src/test/java/gov/cms/ab2d/optout/S3MockAPIExtension.java +++ b/optout/src/test/java/gov/cms/ab2d/optout/S3MockAPIExtension.java @@ -5,7 +5,6 @@ import org.junit.jupiter.api.extension.ExtensionContext; import software.amazon.awssdk.core.sync.RequestBody; import software.amazon.awssdk.services.s3.S3Client; -import software.amazon.awssdk.services.s3.S3ClientBuilder; import software.amazon.awssdk.services.s3.model.*; import java.net.URI; @@ -27,10 +26,9 @@ public void beforeAll(ExtensionContext context) throws Exception { API.start(); - S3ClientBuilder builder = S3Client.builder(); - builder.region(S3_REGION); - builder.endpointOverride(new URI(TEST_ENDPOINT)); - S3_CLIENT = builder + S3_CLIENT = S3Client.builder() + .region(S3_REGION) + .endpointOverride(new URI(TEST_ENDPOINT)) .build(); createBucket();