testSubject.appendEvents("test", new SimpleDomainEventStream(createDomainEvents(13)));
DateTimeUtils.setCurrentMillisFixed(new DateTime(2011, 12, 18, 14, 0, 0, 1).getMillis());
testSubject.appendEvents("test", new SimpleDomainEventStream(createDomainEvents(14)));
DateTimeUtils.setCurrentMillisSystem();
CriteriaBuilder criteriaBuilder = testSubject.newCriteriaBuilder();
testSubject.visitEvents(criteriaBuilder.property("timeStamp").greaterThanEquals(onePM)
.and(criteriaBuilder.property("timeStamp").lessThanEquals(twoPM)),
eventVisitor);
verify(eventVisitor, times(12 + 13)).doWithEvent(isA(DomainEventMessage.class));
}