for(Event event : testEvents) {
service.pushEvent(workflowId, event);
}
int sinceId = -1;
Event foundEvent;
for(Event event : testEvents) {
Iterator<Event> foundEvents = service.getEventsSinceId(workflowId, sinceId, 1).iterator();
foundEvent = foundEvents.next();
assertEqualWorkflows(event, foundEvent);
assertFalse("Wrong number of events returned", foundEvents.hasNext());
sinceId = foundEvent.getId();
}
}