### Question:
SnsConfiguration { @Bean AmazonSNSAsync amazonSNS(ListenerConfig config, AWSCredentialsProvider awsCredentialsProvider) { return AmazonSNSAsyncClient.asyncBuilder() .withCredentials(awsCredentialsProvider) .withRegion(config.getRegion()) .build(); }    }### Answer:
@Test public void snsClient() { AWSCredentialsProvider credentialsProvider = mock(AWSCredentialsProvider.class); when(credentialsProvider.getCredentials()).thenReturn(new BasicAWSCredentials("accessKey", "secretKey")); ListenerConfig config = new ListenerConfig(); config.setRegion("eu-west-1"); AmazonSNS sns = configuration.amazonSNS(config, credentialsProvider); assertThat(sns, is(not(nullValue()))); }