void () { VirtualFile file = createChildDirectory(myPrjDir1, "aaa"); FileManager fileManager = myPsiManager.getFileManager(); PsiDirectory psiDirectory = fileManager.findDirectory(file); EventsTestListener listener = new EventsTestListener(); myPsiManager.addPsiTreeChangeListener(listener,getTestRootDisposable()); delete(file); String string = listener.getEventsString(); String expected = """ beforeChildRemoval childRemoved """; assertEquals(psiDirectory.getName(), expected, string); }