public URLNormalizer encodeSpaces() {
        String path = StringUtils.substringBefore(url, "?");
        path = StringUtils.replace(path, " ", "%20", -1);
        String qs = StringUtils.substringAfter(url, "?");
        if (StringUtils.isNotBlank(qs)) {
            qs = StringUtils.replace(qs, " ", "+", -1);
            url = path + "?" + qs;
        } else {
            url = path;
        }
        return this;
    }
@Test
    public void testEncodeSpaces() {
        s = "http://www.example.com/a b c?d e=f g";
        t = "http://www.example.com/a%20b%20c?d+e=f+g";
        assertEquals(t, n(s).encodeSpaces().toString());
    }