void (final String className, final String newName) { doTest(() -> { rename(className, newName); TestDialogManager.setTestDialog(message -> Messages.YES); FileEditor editor = FileEditorManager.getInstance(myFixture.getProject()).getSelectedEditor(); UndoManager.getInstance(myFixture.getProject()).undo(editor); UndoManager.getInstance(myFixture.getProject()).redo(editor); TestDialogManager.setTestDialog(TestDialog.DEFAULT); }); }