TaskService taskService = activitiRule.getTaskService();
Task task = taskService.createTaskQuery().taskAssignee("henryyan").singleResult();
variableMap = new HashMap<String, Object>();
variableMap.put("amount", 328d);
taskService.complete(task.getId(), variableMap);
task = taskService.createTaskQuery().taskAssignee("henryyan").singleResult();
assertEquals("银行付款", task.getName());
Object variable = taskService.getVariable(task.getId(), "amount");
assertNotNull(variable);