static void parseAuthority(final StringReader reader, final Host host, final Consumer<HostParserException> decorator) throws HostParserException {
        parseUserInfo(reader, host, decorator);
        parseHostname(reader, host, decorator);
        parsePath(reader, host, false, decorator);
    }
@Test
    public void testParseAuthorityUserPasswordDomain() throws HostParserException {
        final Host host = new Host(new TestProtocol());
        final String authority = "user:password@domain.tld";
        final HostParser.StringReader reader = new HostParser.StringReader(authority);

        HostParser.parseAuthority(reader, host, null);
        assertEquals("user", host.getCredentials().getUsername());
        assertEquals("password", host.getCredentials().getPassword());
        assertEquals("domain.tld", host.getHostname());
    }