org.junit.Assert.assertTrue("Repo should be a HCatalogExternalDatasetRepository",
repo instanceof HiveExternalDatasetRepository);
Assert.assertEquals("Repository URI", repoUri, repo.getUri());
// verify location
DatasetDescriptor created = repo.create("tmp", "test",
new DatasetDescriptor.Builder()
.schemaLiteral("\"string\"")
.build()).getDescriptor();
Assert.assertEquals("Location should be in HDFS",
"hdfs", created.getLocation().getScheme());
Assert.assertEquals("Location should have the correct HDFS host",
hdfsUri.getHost(), created.getLocation().getHost());
Assert.assertEquals("Location should have the correct HDFS port",
hdfsUri.getPort(), created.getLocation().getPort());
Assert.assertTrue("Location should be in the repo path",
created.getLocation().getPath().startsWith("/tmp/hive-repo"));
}