public function withAuthority($authority)
    {
        $with_authority = new Authority($authority);

        $new_authority_uri = clone $this;

        $new_authority_uri->authority = $with_authority;

        $new_authority_uri->user_info = $with_authority->getUserInfo();
        $new_authority_uri->host      = $with_authority->getHost();
        $new_authority_uri->port      = $with_authority->getPort();

        return $new_authority_uri;
    }