public function testProcessException()
 {
     $executor = new SourceProcessExecutor($this->manager, $this->processor, new NullLogger());
     $source = new SourceMock(12345);
     $this->manager->expects($this->once())->method('findById')->will($this->returnValue($source));
     $this->processor->expects($this->once())->method('isLinked')->will($this->returnValue(false));
     $this->processor->expects($this->once())->method('process')->will($this->throwException(new SourceProcessException('Foobar')));
     $this->assertFalse($executor->execute($executor->getObjectPayload($source)));
     $messages = $source->getMessages();
     $this->assertInternalType('array', $messages);
     $this->assertArrayHasKey('process', $messages);
     $this->assertArrayHasKey(LogLevel::ERROR, $messages['process']);
     $this->assertContains('Foobar', $messages['process'][LogLevel::ERROR]);
 }