@Test
@SuppressWarnings("squid:S3655")
public void getBasicCredentialsProvider() {

    // Test empty configuration
    final S3FileSystemProvider provider = new S3FileSystemProvider();
    Assert.assertFalse("Expected empty credentials", provider.getBasicCredentialsProvider(S3N, new Configuration(false)).isPresent());
    // Test configuration credentials
    final Configuration conf = new Configuration(false);
    conf.set("fs.s3n.awsAccessKeyId", "S3N_ACCESS_KEY");
    conf.set("fs.s3n.awsSecretAccessKey", "S3N_SECRET_KEY");
    final Optional<AWSCredentialsProvider> credentialsProvider = provider.getBasicCredentialsProvider(S3N, conf);
    Assert.assertTrue("Expected URI credentials", credentialsProvider.isPresent());
    final AWSCredentials credentials = credentialsProvider.get().getCredentials();
    Assert.assertEquals("S3N_ACCESS_KEY", credentials.getAWSAccessKeyId());
    Assert.assertEquals("S3N_SECRET_KEY", credentials.getAWSSecretKey());
}