void () { VirtualFile root = ProjectRootManager.getInstance(myProject).getContentRoots()[0]; VirtualFile file = root.findChild("1.java"); assertNotNull(file); setFileText(file, "class A{ Object o;}"); PsiDocumentManager.getInstance(myProject).commitAllDocuments(); PsiClass objectClass = myJavaFacade.findClass(CommonClassNames.JAVA_LANG_OBJECT, GlobalSearchScope.allScope(getProject())); assertNotNull(objectClass); checkUsages(objectClass, new String[]{"1.java"}); }