### Question:
HistoryHandler { public List<HistoricTaskInstance> getHistoryTaskByUserID(String userID){ List<HistoricTaskInstance> list = processEngine.getHistoryService() .createHistoricTaskInstanceQuery() .taskAssignee(userID) .list(); logger.info("[查询历史任务] [userID=" + userID + "] 共 " + list.size() + " 条记录"); return list; }  List<HistoricProcessInstance> getAllHistoryProcessInstance(); HistoricProcessInstance getHistoryProcessInstanceByProcessInstanceID(String processInstanceID); List<HistoricTaskInstance> getAllHistoryTask(); List<HistoricTaskInstance> getHistoryTaskByUserID(String userID);  }### Answer:
@Test public void getHistoryTaskByUserID() { List<HistoricTaskInstance> list = hh.getHistoryTaskByUserID("smallyu"); for (HistoricTaskInstance hti : list) { logger.info("-----------------------"); logger.info("Task ID: " + hti.getId()); logger.info("Task Name: " + hti.getName()); logger.info("ProcessInstance ID: " + hti.getProcessInstanceId()); logger.info("StartTime: " + hti.getStartTime()); logger.info("EndTime: " + hti.getEndTime()); logger.info("DurationInMillis: " + hti.getDurationInMillis()); } }