public static boolean isValidRootUrl(String url) {
        UrlValidator validator = new CustomUrlValidator();
        return validator.isValid(url);
    }
@Test
    @Issue("JENKINS-51158")
    public void trailingDotsAreAccepted() {
        assertTrue(UrlHelper.isValidRootUrl("http://jenkins.internal./"));
        assertTrue(UrlHelper.isValidRootUrl("http://jenkins.internal......./"));
        assertTrue(UrlHelper.isValidRootUrl("http://my-server.domain.:8080/jenkins"));
        assertTrue(UrlHelper.isValidRootUrl("http://my-server.domain......:8080/jenkins"));
        assertTrue(UrlHelper.isValidRootUrl("http://jenkins.com."));
        assertTrue(UrlHelper.isValidRootUrl("http://jenkins.com......"));
    }