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