public static boolean isAbsoluteUri(final String uriString) {
        if (StringUtils.isBlank(uriString)) {
            return false;
        }
        try {
            URI uri = new URI(uriString);
            return uri.isAbsolute();
        } catch (URISyntaxException e) {
            log.debug("Failed to parse uri: " + uriString, e);
            // ignore this exception
            return false;
        }
    }
@Test
    void isAbsoluteUri() {
        String[] absoluteUris = new String[] {
            "ftp://ftp.is.co.za/rfc/rfc1808.txt",
            "http://www.ietf.org/rfc/rfc2396.txt",
            "ldap://[2001:db8::7]/c=GB?objectClass?one",
            "mailto:John.Doe@example.com",
            "news:comp.infosystems.www.servers.unix",
            "tel:+1-816-555-1212",
            "telnet://192.0.2.16:80/",
            "urn:oasis:names:specification:docbook:dtd:xml:4.1.2",
            "data:text/vnd-example+xyz;foo=bar;base64,R0lGODdh",
            "irc://irc.example.com:6667/#some-channel",
            "ircs://irc.example.com:6667/#some-channel",
            "irc6://irc.example.com:6667/#some-channel"
        };
        for (String uri : absoluteUris) {
            assertThat(PathUtils.isAbsoluteUri(uri)).isTrue();
        }

        String[] paths = new String[] {
            "//example.com/path/resource.txt",
            "/path/resource.txt",
            "path/resource.txt",
            "../resource.txt",
            "./resource.txt",
            "resource.txt",
            "#fragment",
            "",
            null
        };
        for (String path : paths) {
            assertThat(PathUtils.isAbsoluteUri(path)).isFalse();
        }
    }