protected function mapRoute($args)
    {
        $pattern = array_shift($args);
        $callable = array_pop($args);
        $route = $this->router->map($pattern, $callable);
        if (count($args) > 0) {
            $route->setMiddleware($args);
        }

        return $route;
    }