### Question:
URIParserUtil { public static String escapeChars(String s) { StringBuilder sb = new StringBuilder(s.length()); for (int x = 0; x < s.length(); x++) { char ch = s.charAt(x); if (isExcluded(ch)) { byte[] bytes = Character.toString(ch).getBytes(StandardCharsets.UTF_8); for (byte b : bytes) { sb.append('%'); StringUtils.byteToHex(b, sb); } } else { sb.append(ch); } } return sb.toString(); } private  URIParserUtil(); static URL[] pathToURLs(String path); static String escapeChars(String s); static String normalize(final String uri); static String getAbsoluteURI(final String arg); static String relativize(String base, String toBeRelativized); static String relativize(URI baseURI, URI toBeRelativizedURI);  }### Answer:
@Test public void testCXF3855() throws Exception { String orig = new String(new byte[] {-47, -122}, StandardCharsets.UTF_8); orig = "/foo" + orig + ".txt"; String s = URIParserUtil.escapeChars(orig); assertEquals(orig, URLDecoder.decode(s, StandardCharsets.UTF_8.name())); }