public static boolean isValidName(String src) {
    return DFSUtilClient.isValidName(src);
  }
@Test (timeout=15000)
  public void testIsValidName() {
    String validPaths[] = new String[]{"/", "/bar/"};
    for (String path : validPaths) {
      assertTrue("Should have been accepted '" + path + "'", DFSUtil.isValidName(path));
    }

    String invalidPaths[] =
        new String[]{"/foo/../bar", "/foo/./bar", "/foo//bar", "/foo/:/bar", "/foo:bar"};
    for (String path : invalidPaths) {
      assertFalse("Should have been rejected '" + path + "'", DFSUtil.isValidName(path));
    }

    String windowsPath = "/C:/foo/bar";
    if (Shell.WINDOWS) {
      assertTrue("Should have been accepted '" + windowsPath + "' in windows os.",
          DFSUtil.isValidName(windowsPath));
    } else {
      assertFalse("Should have been rejected '" + windowsPath + "' in unix os.",
          DFSUtil.isValidName(windowsPath));
    }
  }