public function testCorrelationDataIsAttached()
 {
     CorrelationDataHolder::setCorrelationData(array('correlationId' => 'test'));
     $this->testSubject->send(new HelloCommand('Hi !!!'));
     \Phake::verify($this->mockCommandBus)->dispatch(\Phake::capture($command), null);
     $this->assertEquals(array('correlationId' => 'test'), $command->getMetaData()->all());
 }
 private function doInvokeSaga(EventMessageInterface $event, SagaInterface $saga)
 {
     try {
         CorrelationDataHolder::setCorrelationData($this->correlationDataProvider->correlationDataFor($event));
         $saga->handle($event);
     } catch (\RuntimeException $ex) {
         $this->handleInvokationException($ex, $event, $saga);
     }
 }