void () { EventsTestListener listener = new EventsTestListener(); myPsiManager.addPsiTreeChangeListener(listener,getTestRootDisposable()); ApplicationManager.getApplication().runWriteAction(() -> { FileTypeManagerEx fileTypeManagerEx = (FileTypeManagerEx)FileTypeManager.getInstance(); fileTypeManagerEx.makeFileTypesChange("psi events test", EmptyRunnable.getInstance()); }); String string = listener.getEventsString(); String expected = """ beforePropertyChange propFileTypes propertyChanged propFileTypes """; assertEquals(expected, string); }