/**
  * @test
  */
 public function it_returns_a_normalized_event_stream_when_normalizers_are_set()
 {
     $normalizedDomainMessage = new DomainMessage('F68E71A1-DBB0-4542-AEE5-BD937E095F74', 2, new Metadata(), new DummyEventSubclass('F68E71A1-DBB0-4542-AEE5-BD937E095F74', 'test 123 456'), BroadwayDateTime::fromString('2015-01-02T08:40:00+0100'));
     $expectedDomainEventStream = new DomainEventStream(array($normalizedDomainMessage));
     $this->dummyNormalizer->expects($this->once())->method('normalize')->with($this->dummyDomainMessage)->willReturn($expectedDomainEventStream);
     $actualEventDomainStream = $this->combinedDomainMessageNormalizer->normalize($this->dummyDomainMessage);
     $this->assertEquals($expectedDomainEventStream, $actualEventDomainStream);
 }
 /**
  * @test
  */
 public function it_does_call_the_handle_method_of_AMQPPublisher()
 {
     $this->domainMessageNormalizer->expects($this->once())->method('normalize')->will($this->returnValue(new DomainEventStream([$this->domainMessage, $this->domainMessage])));
     $this->amqpPublisher->expects($this->exactly(2))->method('handle');
     $this->domainMessageNormalizerAMQPPublisherDecorator->handle($this->domainMessage);
 }