diff --git a/Kitodo/src/test/java/org/kitodo/production/services/workflow/WorkflowControllerServiceIT.java b/Kitodo/src/test/java/org/kitodo/production/services/workflow/WorkflowControllerServiceIT.java index 293510902cc..b824349daf6 100644 --- a/Kitodo/src/test/java/org/kitodo/production/services/workflow/WorkflowControllerServiceIT.java +++ b/Kitodo/src/test/java/org/kitodo/production/services/workflow/WorkflowControllerServiceIT.java @@ -367,12 +367,7 @@ public void shouldCloseForProcessWithSkippedTask() throws DataException, DAOExce assertEquals("Task '" + thirdTaskToSkip.getTitle() + "' was not skipped!", TaskStatus.DONE, thirdTaskToSkip.getProcessingStatus()); - taskService.remove(taskToClose); - taskService.remove(skippedTask); - taskService.remove(secondSkippedTask); - taskService.remove(taskToOpen); - taskService.remove(secondTaskToOpen); - taskService.remove(thirdTaskToSkip); + process.getTasks().clear(); ServiceManager.getProcessService().remove(process); }