public static Host parse(final String url) throws HostParserException {
        final Host parsed = new HostParser().get(url);
        if(log.isDebugEnabled()) {
            log.debug(String.format("Parsed %s as %s", url, parsed));
        }
        return parsed;
    }
@Test
    public void parse() throws HostParserException {
        final Host host = new HostParser(new ProtocolFactory(Collections.singleton(new TestProtocol(Scheme.https))))
            .get("https://t%40u@host:443/key");
        assertEquals("host", host.getHostname());
        assertEquals(443, host.getPort());
        assertEquals("t@u", host.getCredentials().getUsername());
        assertEquals("/key", host.getDefaultPath());
    }