static void parseRootless(final StringReader reader, final Host host, final Consumer<HostParserException> decorator) throws HostParserException {
        // This is not RFC-compliant.
        // * Rootless-path must not include authentication information.
        final boolean userInfoResult = parseUserInfo(reader, host, decorator);

        if(host.getProtocol().isHostnameConfigurable() && StringUtils.isWhitespace(host.getHostname())) {
            // This is not RFC-compliant.
            // We assume for hostconfigurable-empty-hostnames a hostname on first path segment
            parseHostname(reader, host, decorator);
        }
        parsePath(reader, host, false, decorator);
    }
@Test
    public void testParseRootlessWithUser() throws HostParserException {
        final Host host = new Host(new TestProtocol() {
            @Override
            public boolean isHostnameConfigurable() {
                return false;
            }
        });
        final String path = "user@path/sub/directory";
        final HostParser.StringReader reader = new HostParser.StringReader(path);

        HostParser.parseRootless(reader, host, null);
        assertEquals("user", host.getCredentials().getUsername());
        assertEquals("path/sub/directory", host.getDefaultPath());
    }