### Question:
ProcessHandler { public boolean isProcessInstanceEnd(String processInstanceId){ ProcessInstance pi = runtimeService .createProcessInstanceQuery() .processInstanceId(processInstanceId) .singleResult(); if (pi == null){ logger.info("[查询流程状态] [processInstanceId=" + processInstanceId + "] 流程已经结束，或者流程不存在"); return true; } else { logger.info("[查询流程状态] [processInstanceId=" + processInstanceId + "] 流程未结束"); return false; } }  boolean startProcessInstance(String name); List<ProcessInstance> getAllProcessInstance(); boolean isProcessInstanceEnd(String processInstanceId);  }### Answer:
@Test public void isProcessInstanceEnd(){ Assert.assertFalse(ps.isProcessInstanceEnd("17501")); Assert.assertFalse(ps.isProcessInstanceEnd("17501")); Assert.assertFalse(ps.isProcessInstanceEnd("10001")); }