@Test public void testFaultyHighOrderNormalisation() { final String[][] TESTS = new String[][]{ {"Red, Rosé 14%", "red,%20ros%c3%a9%2014%25", "red,%20rosé%2014%25"}, {"red,%20ros%c3%a9%2014%25", "red,%20ros%c3%a9%2014%25", "red,%20rosé%2014%25"} }; for (String[] test: TESTS) { assertEquals("The input '" + test[0] + "' should be normalised with high-order escaping as expected", test[1], Normalisation.canonicaliseURL(test[0], false, true)); assertEquals("The input '" + test[0] + "' should be normalised without high-order escaping as expected", test[2], Normalisation.canonicaliseURL(test[0], true, true)); } }
public static String canonicaliseURL(String url) { return canonicaliseURL(url, true, true); }
Normalisation { public static String canonicaliseURL(String url) { return canonicaliseURL(url, true, true); } }
Normalisation { public static String canonicaliseURL(String url) { return canonicaliseURL(url, true, true); }  }
Normalisation { public static String canonicaliseURL(String url) { return canonicaliseURL(url, true, true); }  static String sanitiseWARCHeaderValue(String value); static String canonicaliseHost(String host); static String canonicaliseURL(String url); static String fixURLErrors(String url); static String resolveRelative(String url, String relative); static String resolveRelative(String url, String relative, boolean normalise); static String canonicaliseURL(String url, boolean allowHighOrder, boolean createUnambiguous); }
Normalisation { public static String canonicaliseURL(String url) { return canonicaliseURL(url, true, true); }  static String sanitiseWARCHeaderValue(String value); static String canonicaliseHost(String host); static String canonicaliseURL(String url); static String fixURLErrors(String url); static String resolveRelative(String url, String relative); static String resolveRelative(String url, String relative, boolean normalise); static String canonicaliseURL(String url, boolean allowHighOrder, boolean createUnambiguous);  }