public function getBestResponseType(array $types)
    {
        if (empty($types))
            return "";

        $this->sortTypes($types);
        $type = reset($types);
        return $this->accepts($type) ? current($types) : null;
    }