@Test
public void testWithHbaseConfAtHdfsFileSystem() throws IOException {

  MiniDFSCluster hdfsCluster = null;
  try {
    HdfsConfiguration hdfsConfig = new HdfsConfiguration();
    hdfsCluster = new MiniDFSCluster.Builder(hdfsConfig)
        .numDataNodes(1).build();
    FileSystem fs = hdfsCluster.getFileSystem();
    Path path = new Path("/tmp/hdfs-site.xml");
    fs.copyFromLocalFile(new Path(hbaseConfigPath), path);
    // Verifying With Hbase Conf from HDFS FileSystem
    Configuration conf = new Configuration(hdfsConfig);
    conf.set(YarnConfiguration.TIMELINE_SERVICE_HBASE_CONFIGURATION_FILE,
        path.toString());
    Configuration hbaseConfFromHdfs =
        HBaseTimelineStorageUtils.getTimelineServiceHBaseConf(conf);
    Assert.assertEquals("Failed to read hbase config from Hdfs FileSystem",
        "test", hbaseConfFromHdfs.get("input"));
  } finally {
    if (hdfsCluster != null) {
      hdfsCluster.shutdown();
    }
  }
}