}
@Test
public void testCreateSnapshot_FirstEventLoadedIsSnapshotEvent() {
UUID aggregateIdentifier = UUID.randomUUID();
StubAggregate aggregate = new StubAggregate(aggregateIdentifier);
aggregate.doSomething();
aggregate.commitEvents();
DomainEventMessage<StubAggregate> first =
new GenericDomainEventMessage<StubAggregate>(
aggregate.getIdentifier(), aggregate.getVersion(), aggregate);
DomainEventMessage secondEvent = new GenericDomainEventMessage<String>(aggregateIdentifier, (long) 0,
"Mock contents", MetaData.emptyInstance()
);
SimpleDomainEventStream eventStream = new SimpleDomainEventStream(first, secondEvent);