/**
  * @return EventProxyStrategy
  */
 protected function buildEventStrategy()
 {
     $this->event = new EventSenderSpy();
     $eventStrategy = new EventProxyStrategy();
     $eventStrategy->setEvent($this->event);
     $this->eventFactory = new EventFactorySpy();
     $eventStrategy->setEventFactory($this->eventFactory);
     $this->proxyStrategyBagFactory->setEventStrategy($eventStrategy);
     $this->proxyStrategyRequestFactory->setEventProxyStrategyRequestBuilder(new EventProxyStrategyRequestBuilderImpl());
 }
 /**
  * @return ProxyStrategyBagFactoryImpl
  */
 protected function buildProxyStrategyBagFactory()
 {
     $proxyStrategyBagFactory = new ProxyStrategyBagFactoryImpl();
     if (null !== $this->cache) {
         $proxyStrategyBagFactory->setCacheStrategy($this->buildCacheStrategy());
     }
     if (null !== $this->event) {
         $proxyStrategyBagFactory->setEventStrategy($this->buildEventStrategy());
     }
     if (null !== $this->logger) {
         $proxyStrategyBagFactory->setLogStrategy($this->buildLogStrategy());
     }
     if (null !== $this->security) {
         $proxyStrategyBagFactory->setSecurityStrategy($this->buildSecurityStrategy());
     }
     if (null !== $this->transaction) {
         $proxyStrategyBagFactory->setTransactionStrategy($this->buildTransactionStrategy());
     }
     return $proxyStrategyBagFactory;
 }