/**
  * @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 \RuntimeException
  * @expectedExceptionCode 3
  */
 public function testGetDefaultAndTooMany()
 {
     $reqHand1 = $this->getMock(RequestHandlerInterface::class);
     $reqHand2 = $this->getMock(RequestHandlerInterface::class);
     $reg = new RequestHandlerRegistry();
     $reg->add('foo', $reqHand1, false);
     $reg->add('bar', $reqHand2, false);
     $reg->getDefault();
 }