void (@NotNull final String firstLine, @NotNull String resultPrefix) { myFixture.configureByFile("/refactoring/inlinelocal/operatorPrecedence/template.py"); WriteCommandAction.runWriteCommandAction(myFixture.getProject(), () -> myFixture.getEditor().getDocument().insertString(0, firstLine + "\n")); PsiDocumentManager.getInstance(myFixture.getProject()).commitAllDocuments(); performRefactoring(null); myFixture.checkResultByFile("/refactoring/inlinelocal/operatorPrecedence/" + resultPrefix + ".after.py"); FileDocumentManager.getInstance().reloadFromDisk(myFixture.getDocument(myFixture.getFile())); }