final DomainEventMessage[] domainEventMessages = {
new GenericDomainEventMessage<ToDoItemCreatedEvent>(
"todo1", 0, new ToDoItemCreatedEvent("todo1", "Need to do something")),
new GenericDomainEventMessage<ToDoItemCreatedEvent>(
"todo2", 0, new ToDoItemCreatedEvent("todo2", "Another thing to do")),
new GenericDomainEventMessage<ToDoItemCompletedEvent>("todo2", 0, new ToDoItemCompletedEvent("todo2"))
};
eventStore.appendEvents("mock", new SimpleDomainEventStream(domainEventMessages));
// we get the executor service from the application context and start the replay as an asynchronous process
Future<Void> future = replayingCluster.startReplay(executor);