public function getMethod($name)
    {
        var_dump(array_keys($this->methods));

        if (!isset($this->methods[$name])) {
            throw new RuntimeException(sprintf(
                'Unable to find RPC method %s', $name
            ));
        }

        return $this->methods[$name];
    }