DatasetRepository repo = DatasetRepositories
.repositoryFor("repo:hive://meta-host:1234");
Assert.assertNotNull("Received a repository", repo);
Assert.assertTrue("Repo should be a HCatalogDatasetRepository",
repo instanceof HiveManagedDatasetRepository);
MetadataProvider provider = ((HiveManagedDatasetRepository) repo)
.getMetadataProvider();
Assert.assertTrue("Repo should be using a HCatalogManagedMetadataProvider",
provider instanceof HiveManagedMetadataProvider);
Assert.assertEquals("Repository URI",
URI.create("repo:hive://meta-host:1234"), repo.getUri());