}
@Test
public void testCounterDoesNotResetWhenUsingCache() {
testSubject.setAggregateCache(mockCache);
readAllFrom(testSubject.decorateForRead("some", aggregateIdentifier, new SimpleDomainEventStream(
new GenericDomainEventMessage<String>(aggregateIdentifier, (long) 0,
"Mock contents", MetaData.emptyInstance()),
new GenericDomainEventMessage<String>(aggregateIdentifier, (long) 1,
"Mock contents", MetaData.emptyInstance())
)));
readAllFrom(testSubject.decorateForAppend("some", aggregate, new SimpleDomainEventStream(
new GenericDomainEventMessage<String>(aggregateIdentifier, (long) 2,
"Mock contents", MetaData.emptyInstance())
)));
readAllFrom(testSubject.decorateForAppend("some", aggregate, new SimpleDomainEventStream(
new GenericDomainEventMessage<String>(aggregateIdentifier, (long) 3,
"Mock contents", MetaData.emptyInstance())
)));
verify(mockSnapshotter, never()).scheduleSnapshot("some", aggregateIdentifier);