UriEncoder { static public String encode(String s) { return encode(s, JAVA_URI_FORBIDDEN); }  static String encode(String s); static String encodeAsAscii(String s);  }
@Test(dataProvider = "paths") public void testURIEncode(String path) throws URISyntaxException { Assert.assertEquals(UriEncoder.encode("http: new URI("http", "example.com", "/" + path, null).toString()); }