taskService.setAssignee(taskId, "jonny");
terminate(humanTaskId);
// then
VariableInstanceQuery query = runtimeService
.createVariableInstanceQuery()
.caseInstanceIdIn(caseInstanceId);
assertEquals(7, query.count());
assertTrue((Boolean) query.variableName("create").singleResult().getValue());
assertEquals(1, query.variableName("createEventCounter").singleResult().getValue());
assertTrue((Boolean) query.variableName("assignment").singleResult().getValue());
assertEquals(1, query.variableName("assignmentEventCounter").singleResult().getValue());
assertTrue((Boolean) query.variableName("delete").singleResult().getValue());
assertEquals(1, query.variableName("deleteEventCounter").singleResult().getValue());
assertEquals(3, query.variableName("eventCounter").singleResult().getValue());
}