void (@NotNull String before, @NotNull String after) { configureFromFileText(getTestName(false) + ".java", before); WriteCommandAction.runWriteCommandAction(getProject(), () -> CodeStyleManager.getInstance(getProject()).reformatText(getFile(), 0, getEditor().getDocument().getTextLength())); checkResultByText(after); }