private function validateUrl( $urlParts ) {
        if ( !is_array( $urlParts ) ) {
            throw new \InvalidArgumentException( 'Invalid serverUrl has been provided' );
        }

        if ( !isset( $urlParts["scheme"] ) ) {
            throw new \InvalidArgumentException( 'serverUrl has been provided without a valid scheme (http:// or https://)' );
        }

        if ( !isset( $urlParts["host"] ) ) {
            throw new \InvalidArgumentException( 'Invalid serverUrl has been provided' );
        }
    }