protected function allowed($method)
    {
        if (in_array($method, $this->allowed) === false) {
            $message = 'Used method is not allowed';

            throw new \UnexpectedValueException($message);
        }

        return true;
    }