void (VirtualFile file) { PsiManagerEx psiManager = PsiManagerEx.getInstanceEx(getProject()); GCWatcher.tracking(FileDocumentManager.getInstance().getCachedDocument(file), psiManager.getFileManager().getCachedPsiFile(file)).ensureCollected(); assertNull(FileDocumentManager.getInstance().getCachedDocument(file)); assertNull(psiManager.getFileManager().getCachedPsiFile(file)); }