### Question:
UrlDecoder { public static TextualPath decodePath(String pathString) { TextualPath path = new TextualPath(); StringTokenizer stringTokenizer = new StringTokenizer(pathString, "/"); while (stringTokenizer.hasMoreTokens()) { String pathElement = decode(stringTokenizer.nextToken()); path.add(pathElement); } return path; }  static String decode(String s); static TextualPath decodePath(String pathString);  }### Answer:
@Test public void testDecodePath() { assertEquals("/", UrlDecoder.decodePath("/").toString()); assertEquals("/", UrlDecoder.decodePath("").toString()); assertEquals("/abc", UrlDecoder.decodePath("abc").toString()); assertEquals("/abc/def", UrlDecoder.decodePath("abc/def").toString()); assertEquals("/abc/def", UrlDecoder.decodePath("abc/def/").toString()); assertEquals("/a!@#/def", UrlDecoder.decodePath("a!%40%23/def/").toString()); assertEquals("/ab/c/def", UrlDecoder.decodePath("/ab%2Fc/def").toString()); assertEquals("ab/c", UrlDecoder.decodePath("/ab%2Fc/def").getFirstElement()); }