PathUtils { public static boolean isAbsolute(String path) { return path != null && !path.isEmpty() && path.charAt(0) == '/'; }  static String join(String... paths); static String normalize(String path); static boolean isAbsolute(String path); static String removeLeadingSlash(String path); static String addLeadingSlash(String path); static String addTrailingSlash(String path);  }
@Test public void testIsAbsolute() { assertTrue(isAbsolute("/absolute/path")); assertFalse(isAbsolute("relative/path")); assertFalse(isAbsolute("")); }