/**
  * @return ServiceProxyFactory
  */
 protected function getServiceProxyFactory($cacheDir = null)
 {
     $serviceProxyFactory = new ServiceProxyFactory();
     $configuration = new Configuration();
     $configuration->setProxiesTargetDir($cacheDir);
     $serviceProxyFactory->setProxyFactory($this->buildProxyFactory($configuration));
     return $serviceProxyFactory;
 }
 /**
  * @test
  */
 public function WithCacheAnnotation_ReturnServiceProxyCacheInterface()
 {
     $inputClass = new CacheAnnotationClass();
     $this->factory->setCacheProvider(new CacheProviderDecorator(new ArrayCache()));
     /** @var ServiceProxyInterface|CacheAnnotationClass $proxy */
     $proxy = $this->factory->createProxy($inputClass);
     $this->assertServiceCacheProxy($inputClass, $proxy);
     $this->assertTrue($proxy->aMethodWithoutAnnotation());
 }