// exclude subtasks
query = taskService.createTaskQuery().taskAssignee("gonzo").excludeSubtasks().orderByTaskCreateTime().asc();
assertEquals(2, query.count());
assertEquals(2, query.list().size());
assertEquals(sdf.parse("01/02/2008 02:02:02.000"), query.list().get(0).getCreateTime());
assertEquals(sdf.parse("05/02/2008 02:02:02.000"), query.list().get(1).getCreateTime());
// kermit has no root tasks and no subtasks assigned
// include subtasks
query = taskService.createTaskQuery().taskAssignee("kermit").orderByTaskCreateTime().asc();
assertEquals(0, query.count());