void () { FileManager fileManager = myPsiManager.getFileManager(); VirtualFile file = createChildData(myPrjDir1, "a.txt"); PsiFile psiFile = fileManager.findFile(file); GCWatcher.tracking(((FileManagerImpl)fileManager).getCachedDirectory(myPrjDir1)).ensureCollected(); EventsTestListener listener = new EventsTestListener(); myPsiManager.addPsiTreeChangeListener(listener,getTestRootDisposable()); rename(file, "b.txt"); String string = listener.getEventsString(); String expected = """ beforePropertyChange fileName propertyChanged fileName """; assertEquals(psiFile.getName(), expected, string); }