TaskQuery query = taskService.createTaskQuery().taskDelegationState(null);
assertEquals(12, query.count());
assertEquals(12, query.list().size());
query = taskService.createTaskQuery().taskDelegationState(DelegationState.PENDING);
assertEquals(0, query.count());
assertEquals(0, query.list().size());
query = taskService.createTaskQuery().taskDelegationState(DelegationState.RESOLVED);
assertEquals(0, query.count());
assertEquals(0, query.list().size());
String taskId= taskService.createTaskQuery().taskAssignee("gonzo").singleResult().getId();