void (final String @NotNull ... before) { assert before.length > 1; final PsiFile file = createFile("A.java", ""); final PsiDocumentManager manager = PsiDocumentManager.getInstance(getProject()); final Document document = manager.getDocument(file); String afterFirst = replaceAndProcessDocument(REFORMAT, before[0], file, document); for (String nextBefore: before) { assertEquals(afterFirst, replaceAndProcessDocument(REFORMAT, nextBefore, file, document)); } }