/**
  * @test
  * @covers ::findById
  */
 public function it_should_return_null_if_there_are_no_events_for_the_given_entity()
 {
     $streamUri = 'stream.id';
     $this->streamNameGenerator->shouldReceive('generate')->andReturn($streamUri);
     $this->eventStore->shouldReceive('forwardStreamFeedIterator')->once()->with($streamUri)->andReturn([]);
     $this->assertNull($this->repository->findById('1'));
 }
 public function findById($uuid)
 {
     return $this->reconstituteAggregateFromDomainEvents($this->aggregateClassName, $this->getDomainEventsFromStream($this->streamNameGenerator->generate($this->aggregateClassName, (string) $uuid)));
 }