protected function setUp()
 {
     $this->configProvider = $this->getMockBuilder('Oro\\Bundle\\EntityConfigBundle\\Provider\\ConfigProvider')->disableOriginalConstructor()->getMock();
     $this->cache = $this->getMockBuilder('Doctrine\\Common\\Cache\\CacheProvider')->setMethods(['delete', 'deleteAll', 'fetch', 'save'])->getMockForAbstractClass();
     $container = $this->getMock('Symfony\\Component\\DependencyInjection\\ContainerInterface');
     $container->expects($this->any())->method('get')->will($this->returnValueMap([['oro_entity_config.provider.ownership', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $this->configProvider], ['oro_security.owner.ownership_metadata_provider.cache', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $this->cache]]));
     $this->provider = new OwnershipMetadataProviderStub($this);
     $this->provider->setContainer($container);
     $this->config = new Config(new EntityConfigId('ownership', self::SOME_CLASS));
 }