private function handleNonMethodMatchingRoutes(
            CalledUri $calledUri,
            MatchingRoutes $matchingRoutes
    ): UriResource {
        if ($calledUri->methodEquals('OPTIONS')) {
            return new ResourceOptions(
                    $this->injector,
                    $calledUri,
                    $this->collectInterceptors($calledUri),
                    $this->supportedMimeTypes(),
                    $matchingRoutes

            );
        }

        return new MethodNotAllowed(
                $this->injector,
                $calledUri,
                $this->collectInterceptors($calledUri),
                $this->supportedMimeTypes(),
                $matchingRoutes->allowedMethods()
        );
    }