    @Test
    public void testNonUTF8Escapes() {

        final String[][] TESTS = new String[][]{
                {"http://example.com/%C3%86blegr%C3%B8d", "http://example.com/Æblegrød"},     // UTF-8 escapes
                {"http://example.com/%C3%86blegr%C3",     "http://example.com/Æblegr%c3"},    // Half UTF-8 2-byte escape
                {"http://example.com/Æblegrød",           "http://example.com/æblegrød"},     // Direct unicode
                {"http://example.com/%C6blegr%F8d",       "http://example.com/%c6blegr%f8d"}, // ISO-8859-1
                {"http://www.example.com/%C6blegr%F8d",   "http://example.com/%c6blegr%f8d"}, // ISO-8859-1
        };

        for (String[] test: TESTS) {
            assertEquals("The input '" + test[0] + "' should be normalised as expected",
                         test[1], Normalisation.canonicaliseURL(test[0]));
        }
    }