@Test
  public void testSetWALRootDir() throws Exception {
    Path p = new Path("file:///hbase/root");
    CommonFSUtils.setWALRootDir(conf, p);
    assertEquals(p.toString(), conf.get(CommonFSUtils.HBASE_WAL_DIR));
  }
Test path compare and prefix checking.
hbase-common/src/test/java/org/apache/hadoop/hbase/util/TestCommonFSUtils.java