### Question:
SnakerEngineFacets { public List<Task> getTasks(String orderId) { return engine.query().getActiveTasks(new QueryFilter().setOrderId(orderId)); }  String initFlows(); List<Process> getAllProcess(); List<Process> getProcessByOrderId(String orderId); SnakerEngine getEngine(); List<String> getAllProcessNames(); Order startInstanceById(String processId, String operator, Map<String, Object> args); Order startInstanceByName(String name, Integer version, String operator, Map<String, Object> args); Order startAndExecute(String name, Integer version, String operator, Map<String, Object> args); Order startAndExecute(String processId, String operator, Map<String, Object> args); List<Task> execute(String taskId, String operator, Map<String, Object> args); List<Task> executeAndJump(String taskId, String operator, Map<String, Object> args, String nodeName); List<Task> getTasks(String orderId);  }### Answer:
@Test public void getTasks() { snakerEngineFacets.initFlows(); List<Process> allProcess = snakerEngineFacets.getAllProcess(); if (!CollectionUtils.isEmpty(allProcess)) { Process process = allProcess.get(0); Order dm = snakerEngineFacets.startAndExecute(process.getId(), "apply.operator", null); List<Task> tasks = snakerEngineFacets.getTasks(dm.getId()); Assert.assertNotNull(tasks); } }