/**
  * @param $requestHandlerAlias
  *
  * @return RequestHandlerInterface
  */
 private function guessRequestHandler($requestHandlerAlias)
 {
     if (self::USE_DEFAULT_KEY == $requestHandlerAlias) {
         return $this->requestHandlerRegistry->getDefault();
     } elseif ($this->container->has($requestHandlerAlias)) {
         return $this->container->get($requestHandlerAlias);
     } else {
         return $this->requestHandlerRegistry->get($requestHandlerAlias);
     }
 }
 /**
  * @expectedException \InvalidArgumentException
  * @expectedExceptionCode 1
  */
 public function testGetNotExistingService()
 {
     $reg = new RequestHandlerRegistry();
     $reg->get('foo');
 }