@Test
  public void testFsUriSetProperly() throws Exception {
    HMaster master = UTIL.getMiniHBaseCluster().getMaster();
    MasterFileSystem fs = master.getMasterFileSystem();
    Path masterRoot = CommonFSUtils.getRootDir(fs.getConfiguration());
    Path rootDir = CommonFSUtils.getRootDir(fs.getFileSystem().getConf());
    // make sure the fs and the found root dir have the same scheme
    LOG.debug("from fs uri:" + FileSystem.getDefaultUri(fs.getFileSystem().getConf()));
    LOG.debug("from configuration uri:" + FileSystem.getDefaultUri(fs.getConfiguration()));
    // make sure the set uri matches by forcing it.
    assertEquals(masterRoot, rootDir);
  }
Test the master filesystem in a local cluster
hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterFileSystem.java