private function validate($apiRawResponse)
    {
        $response = json_decode($apiRawResponse);

        if (null === $response) {
            throw new InvalidApiResponseException('Sina response is probably mal-formed because cannot be json-decoded.');
        }

        if (property_exists($response, 'error')) {
            throw new InvalidApiResponseException(sprintf(
                'Sina returned status code "%s" with message "%s".',
                property_exists($response, 'error_code') ? $response->error_code : '',
                property_exists($response, 'error') ? $response->error : ''
            ));
        }

        if (property_exists($response, 'urls')) {
            if (empty($response->urls[0]->url_long)) {
                throw new InvalidApiResponseException('Property "longUrl" does not exist within Sina response.');
            }
        }

        return $response;
    }