UriDecoder { protected static List<String> splitAndDecodePath(final String path) throws UriParserSyntaxException { List<String> pathSegmentsDecoded = new ArrayList<>(); for (final String segment : split(path, '/')) { pathSegmentsDecoded.add(decode(segment)); } return pathSegmentsDecoded; }  static boolean isFormEncoding(); static String decode(final String encoded);  }
@Test public void path() throws Exception { assertEquals(Arrays.asList("a", "entitySet('/')", "bcd"), UriDecoder.splitAndDecodePath("a/entitySet('%2F')/b%63d")); }
@Test(expected = UriParserSyntaxException.class) public void wrongPercentEncoding() throws Exception { UriDecoder.splitAndDecodePath("%wrong"); }