@Test
@SuppressWarnings("unchecked")
public void listFilesS3a() {

    // Setup configuration
    final Configuration conf = new Configuration(false);
    conf.setClass(Constants.S3_CLIENT_FACTORY_IMPL, MockS3ClientFactory.class, S3ClientFactory.class);
    // Test listing buckets
    final S3FileSystemProvider provider = new S3FileSystemProvider();
    final List<DataSetFile> files = provider.listFiles(new Path(S3A), conf);
    Assert.assertThat(files, CoreMatchers.hasItems(isDataSetFile(MockS3ClientFactory.BUCKET1), isDataSetFile(MockS3ClientFactory.BUCKET2)));
    Assert.assertEquals(2, files.size());
}