### Question:
SnsConfiguration { @Bean AWSCredentialsProvider awsCredentialsProvider( @Qualifier("replicaHiveConf") org.apache.hadoop.conf.Configuration conf) { return new AWSCredentialsProviderChain(new BasicAuth(conf), InstanceProfileCredentialsProvider.getInstance()); }    }### Answer:
@Test public void credentials() throws IOException { when(conf.getPassword("access.key")).thenReturn("accessKey".toCharArray()); when(conf.getPassword("secret.key")).thenReturn("secretKey".toCharArray()); AWSCredentialsProvider credentialsProvider = configuration.awsCredentialsProvider(conf); AWSCredentials awsCredentials = credentialsProvider.getCredentials(); assertThat(awsCredentials.getAWSAccessKeyId(), is("accessKey")); assertThat(awsCredentials.getAWSSecretKey(), is("secretKey")); }