S3ClientProvider { @Bean public AmazonS3Client getClient() { AWSCredentials credentials = getAwsCredentials(); AmazonS3Client amazonS3Client = new AmazonS3Client(credentials, getClientConfiguration()); if (s3Configuration.getRegion() != null) { Region region = Region.getRegion(Regions.fromName(s3Configuration.getRegion())); amazonS3Client.setRegion(region); } return amazonS3Client; }  @Bean AmazonS3Client getClient();  }
@Test @SneakyThrows public void getClient() { AmazonS3Client client = ctx.getBean(AmazonS3Client.class); assertNotNull(client); }