void () { final VirtualFile file = myFixture.configureByText(TEST_TXT, TYPPO).getVirtualFile(); final FileEditor editor = FileEditorManager.getInstance(getProject()).getSelectedEditor(file); final UndoManager instance = UndoManager.getInstance(getProject()); ((UndoManagerImpl)instance).dropHistoryInTests(); // to make sure it's empty doTest(TYPPO); assertFalse(instance.isUndoAvailable(editor)); }