void (String originalText, String[] changeWhat, String[] changeInto, List<String> addedEditedTodosExpected, List<String> inChangedTodosExpected) { myChildData = createChildData(myRootFile, "Test.java"); final Change change = change(originalText, changeWhat, changeInto); final TodoCheckinHandlerWorker worker = runTodoWorker(change); assertTrue(worker.getSkipped().isEmpty()); Set<String> addedEditedTodosActual = worker.getAddedOrEditedTodos().stream().map(this::todoAsString).collect(Collectors.toSet()); Set<String> inChangedTodosActual = worker.getInChangedTodos().stream().map(this::todoAsString).collect(Collectors.toSet()); assertEquals(new HashSet<>(addedEditedTodosExpected), addedEditedTodosActual); assertEquals(new HashSet<>(inChangedTodosExpected), inChangedTodosActual); }