void (String text) { DocumentImpl document = new DocumentImpl(text); List<TextRange> expectedTodoRanges = extractExpectedTodoRanges(document); List<HighlightInfo> highlightInfos = doHighlighting(); checkResultByText(document.getText()); List<TextRange> actualTodoRanges = getActualTodoRanges(highlightInfos); assertTodoRanges(expectedTodoRanges, actualTodoRanges); }