### Question:
CommonBeans { @Bean @Profile("test") AmazonS3 amazonS3Test() { String s3Endpoint = System.getProperty("aws.s3.endpoint"); String region = System.getProperty("aws.region"); EndpointConfiguration endpointConfiguration = new EndpointConfiguration(s3Endpoint, region); return AmazonS3ClientBuilder.standard() .withEndpointConfiguration(endpointConfiguration) .build(); }  @Bean @Profile("default") AmazonS3 amazonS3(); @Bean S3Client s3Client(AmazonS3 amazonS3, @Value("${properties.dry-run-enabled}") boolean dryRunEnabled);  }### Answer:
@Test void endpointConfiguredAmazonClient() { System.setProperty(AWS_S3_ENDPOINT_PROPERTY, ENDPOINT); AmazonS3 amazonS3 = commonBeans.amazonS3Test(); URL url = amazonS3.getUrl(BUCKET, KEY); assertThat(url.getHost()).isEqualTo(String.join(".", BUCKET, ENDPOINT)); }