public function getDevice($deviceId, Request\GenericRequest $request = null)
    {
        if ($request !== null) {
            if (!($request instanceof GenericRequest)) {
                throw new \InvalidArgumentException(
                    'Error: Request parameter must be null or instance of WURFL_Request_GenericRequest'
                );
            }

            // Normalization must be performed if request is passed so virtual capabilities can be
            // resolved correctly.  This is normally handled in self::deviceIdForRequest()
            $generic_normalizer = UserAgentHandlerChainFactory::createGenericNormalizers();
            $request->setUserAgentNormalized($generic_normalizer->normalize($request->getUserAgent()));
        }

        return $this->getWrappedDevice($deviceId, $request);
    }