public function it_provides_the_uncommitted_changes(ProxyEventContainerFactoryStub $eventContainerFactory, EventContainer $eventContainer, ProxyEventStreamFactoryStub $eventStreamFactory, EventStream $eventStream)
 {
     $this->beConstructedThrough('create', [new UuidAggregateRootIdentifier(), $eventContainerFactory, $eventStreamFactory]);
     $eventContainerFactory->proxy(Argument::any())->willReturn();
     $eventContainerFactory->create(Argument::any())->willReturn($eventContainer);
     $eventContainer->initializeSequenceNumber(Argument::any())->willReturn();
     $eventContainer->addEventFromPayload(Argument::any())->willReturn();
     $eventContainer->eventStream()->willReturn($eventStream);
     $eventContainer->lastSequenceNumber()->willReturn(1);
     $eventContainer->commit()->willReturn();
     $this->uncommittedChanges()->shouldReturn($eventStream);
     $this->commitChanges();
     $this->uncommittedChanges()->shouldReturn($eventStream);
 }
 public function setEventContainerFactoryProxy(ProxyEventContainerFactoryStub $proxy)
 {
     $proxy->proxy(parent::eventContainerFactory());
     $this->eventContainerFactory = $proxy;
 }