UUID identifier = UUID.randomUUID();
DomainEventMessage event1 = new GenericDomainEventMessage<String>(identifier, (long) 1,
"Mock contents", MetaData.emptyInstance());
DomainEventMessage event2 = new GenericDomainEventMessage<String>(identifier, (long) 2,
"Mock contents", MetaData.emptyInstance());
when(mockEventStore.readEvents("test", identifier)).thenReturn(new SimpleDomainEventStream(event1, event2));
TestAggregate aggregate = testSubject.load(identifier, null);
assertEquals(0, aggregate.getUncommittedEventCount());
assertEquals(2, aggregate.getHandledEvents().size());