public URLNormalizer removeDuplicateSlashes() {
        String urlRoot = HttpURL.getRoot(url);
        String path = toURL().getPath();
        String urlRootAndPath = urlRoot + path;
        String newPath = path.replaceAll("/{2,}", "/");
        String newUrlRootAndPath = urlRoot + newPath;
        url = StringUtils.replaceOnce(url, urlRootAndPath, newUrlRootAndPath);
        return this;
    }
@Test
    public void testRemoveDuplicateSlashes() {
        s = "http://www.example.com/a//b///c////d/////e.html";
        t = "http://www.example.com/a/b/c/d/e.html";
        assertEquals(t, n(s).removeDuplicateSlashes().toString());
        s = "http://www.example.com/a//b//c.html?path=/d//e///f";
        t = "http://www.example.com/a/b/c.html?path=/d//e///f";
        assertEquals(t, n(s).removeDuplicateSlashes().toString());
        // This one is for HTTP Collector GitHub issue #163:
        s = "http://www.example.com//";
        t = "http://www.example.com/";
        assertEquals(t, n(s).removeDuplicateSlashes().toString());
    }