public URLNormalizer removeTrailingQuestionMark() {
        if (url.endsWith("?") && StringUtils.countMatches(url, "?") == 1) {
            url = StringUtils.removeEnd(url, "?");
        }
        return this;
    }
@Test
    public void testRemoveTrailingQuestionMark() {
        s = "http://www.example.com/remove?";
        t = "http://www.example.com/remove";
        assertEquals(t, n(s).removeTrailingQuestionMark().toString());
        s = "http://www.example.com/keep?a=b";
        t = "http://www.example.com/keep?a=b";
        assertEquals(t, n(s).removeTrailingQuestionMark().toString());
        s = "http://www.example.com/keep?a=b?";
        t = "http://www.example.com/keep?a=b?";
        assertEquals(t, n(s).removeTrailingQuestionMark().toString());
    }