void (@NotNull String before, @NotNull String current, TextRange @NotNull ... expectedRanges) { DocumentImpl beforeDocument = new DocumentImpl(before); DocumentImpl currentDocument = new DocumentImpl(current); List<TextRange> actualRanges = ChangesDiffCalculator.calculateDiff(beforeDocument, currentDocument); assertEquals(Arrays.asList(expectedRanges), actualRanges); }