.when(mockEventStore).appendSnapshotEvent(eq("test"), isA(DomainEventMessage.class));
when(mockEventStore.readEvents("test", aggregateIdentifier))
.thenAnswer(new Answer<Object>() {
@Override
public Object answer(InvocationOnMock invocationOnMock) throws Throwable {
return new SimpleDomainEventStream(
new GenericDomainEventMessage<String>(aggregateIdentifier, (long) 0,
"Mock contents", MetaData.emptyInstance()),
new GenericDomainEventMessage<String>(aggregateIdentifier, (long) 1,
"Mock contents", MetaData.emptyInstance()));
}