@Test
  public void testGetWALRootDir() throws IOException {
    Path root = new Path("file:///hbase/root");
    Path walRoot = new Path("file:///hbase/logroot");
    CommonFSUtils.setRootDir(conf, root);
    assertEquals(root, CommonFSUtils.getRootDir(conf));
    assertEquals(root, CommonFSUtils.getWALRootDir(conf));
    CommonFSUtils.setWALRootDir(conf, walRoot);
    assertEquals(walRoot, CommonFSUtils.getWALRootDir(conf));
  }
Test path compare and prefix checking.
hbase-common/src/test/java/org/apache/hadoop/hbase/util/TestCommonFSUtils.java