FileSystemEventStore eventStore = new FileSystemEventStore(new SimpleEventFileResolver(eventFileBaseDir));
GenericDomainEventMessage<StubDomainEvent> event1 = new GenericDomainEventMessage<StubDomainEvent>(
aggregateIdentifier,
0,
new StubDomainEvent());
GenericDomainEventMessage<StubDomainEvent> event2 = new GenericDomainEventMessage<StubDomainEvent>(
aggregateIdentifier,
1,
new StubDomainEvent());
GenericDomainEventMessage<StubDomainEvent> event3 = new GenericDomainEventMessage<StubDomainEvent>(
aggregateIdentifier,
2,
new StubDomainEvent());
DomainEventStream stream = new SimpleDomainEventStream(event1, event2, event3);
eventStore.appendEvents("test", stream);
DomainEventStream eventStream = eventStore.readEvents("test", aggregateIdentifier);
List<DomainEventMessage<?>> domainEvents = new ArrayList<DomainEventMessage<?>>();