assertEquals(8, query.count());
assertEquals(8, statistics.size());
// end1
HistoricActivityStatistics end1 = statistics.get(0);
assertEquals("end1", end1.getId());
assertEquals(0, end1.getInstances());
assertEquals(5, end1.getFinished());
// gtw
HistoricActivityStatistics gtw = statistics.get(1);
assertEquals("gtw", gtw.getId());
assertEquals(0, gtw.getInstances());
assertEquals(5, gtw.getFinished());
// innerEnd
HistoricActivityStatistics innerEnd = statistics.get(2);
assertEquals("innerEnd", innerEnd.getId());
assertEquals(0, innerEnd.getInstances());
assertEquals(25, innerEnd.getFinished());
// innerStart
HistoricActivityStatistics innerStart = statistics.get(3);
assertEquals("innerStart", innerStart.getId());
assertEquals(0, innerStart.getInstances());
assertEquals(25, innerStart.getFinished());
// innerTask
HistoricActivityStatistics innerTask = statistics.get(4);
assertEquals("innerTask", innerTask.getId());
assertEquals(0, innerTask.getInstances());
assertEquals(25, innerTask.getFinished());
// innerStart
HistoricActivityStatistics start = statistics.get(5);
assertEquals("start", start.getId());
assertEquals(0, start.getInstances());
assertEquals(5, start.getFinished());
// subprocess
HistoricActivityStatistics subProcess = statistics.get(6);
assertEquals("subprocess", subProcess.getId());
assertEquals(0, subProcess.getInstances());
assertEquals(25, subProcess.getFinished());
// task
HistoricActivityStatistics task = statistics.get(7);
assertEquals("task", task.getId());
assertEquals(5, task.getInstances());
assertEquals(0, task.getFinished());
completeProcessInstances();
}