public void testReceyclingExecutionWithCallActivity() {
String processInstanceId = runtimeService.startProcessInstanceByKey("parent-process").getId();
// After process start we have two tasks, one from the parent and one from the sub process
TaskQuery query = taskService.createTaskQuery().orderByTaskName().asc();
List<Task> tasks = query.list();
assertEquals(2, tasks.size());
assertEquals("Another task", tasks.get(0).getName());
assertEquals("Some Task", tasks.get(1).getName());
// we complete the task from the parent process, the root execution is receycled, the task in the sub process is still there