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