public void loadRepository() throws Exception {
Configuration conf = new Configuration();
conf.set(key("testing"), MockHadoopDataSource.class.getName());
conf.set(key("testing", "path"), "testing");
conf.set(key("testing", "hello"), "world");
DirectDataSourceRepository repo = HadoopDataSourceUtil.loadRepository(conf);
DirectDataSource ds = repo.getRelatedDataSource("testing");
assertThat(ds, instanceOf(MockHadoopDataSource.class));
MockHadoopDataSource mock = (MockHadoopDataSource) ds;
assertThat(mock.conf, is(notNullValue()));
assertThat(mock.profile.getPath(), is("testing"));
}