/**
  * @param Integration $integration
  * @param LoggerInterface $logger
  * @return AbstractSyncProcessor
  */
 protected function getSyncProcessor(Integration $integration, $logger)
 {
     if (!$this->processorRegistry) {
         $this->processorRegistry = $this->getService(self::SYNC_PROCESSOR_REGISTRY);
     }
     $processor = $this->processorRegistry->getProcessorForIntegration($integration);
     $processor->getLoggerStrategy()->setLogger($logger);
     return $processor;
 }
 /**
  * @expectedException \Oro\Bundle\IntegrationBundle\Exception\InvalidConfigurationException
  * @expectedExceptionMessage Default sync processor was not set
  */
 public function testRegistryException()
 {
     $channelOne = $this->getMockBuilder('Oro\\Bundle\\IntegrationBundle\\Entity\\Channel')->disableOriginalConstructor()->getMock();
     $channelOne->expects($this->any())->method('getType')->will($this->returnValue('test1'));
     $this->registry->getProcessorForIntegration($channelOne);
 }