/**
  * @expectedException \OutOfBoundsException
  */
 public function testNextReadBeyondEnd()
 {
     $event1 = new GenericDomainEventMessage(Uuid::uuid1(), 0, new \stdClass(), new MetaData());
     $testSubject = new SimpleDomainEventStream(array($event1));
     $testSubject->next();
     $testSubject->next();
 }
 public function getUncommittedEvents()
 {
     if (null === $this->eventContainer) {
         return SimpleDomainEventStream::emptyStream();
     }
     return $this->eventContainer->getEventStream();
 }