assertEquals(3, query.count());
assertEquals(3, statistics.size());
// end
HistoricActivityStatistics end = statistics.get(0);
assertEquals("end", end.getId());
assertEquals(0, end.getInstances());
assertEquals(0, end.getCanceled());
assertEquals(2, end.getFinished());
assertEquals(2, end.getCompleteScope());
// start
HistoricActivityStatistics start = statistics.get(1);
assertEquals("start", start.getId());
assertEquals(0, start.getInstances());
assertEquals(0, start.getCanceled());
assertEquals(6, start.getFinished());
assertEquals(0, start.getCompleteScope());
// task
HistoricActivityStatistics task = statistics.get(2);
assertEquals("task", task.getId());
assertEquals(2, task.getInstances());
assertEquals(2, task.getCanceled());
assertEquals(4, task.getFinished());
assertEquals(0, task.getCompleteScope());
}