void () { //noinspection unused PsiFile psiFile = addFileToProject("Foo.java", "class Foo {}"); GlobalSearchScope scope = GlobalSearchScope.allScope(getProject()); GCUtil.tryGcSoftlyReachableObjects(); PsiClass psiClass = JavaPsiFacade.getInstance(getProject()).findClass("Foo", scope); assertNotNull(psiClass); long count = getJavaTracker().getModificationCount(); IdeaTestUtil.setModuleLanguageLevel(getModule(), LanguageLevel.JDK_1_3); assertTrue(count != getJavaTracker().getModificationCount()); psiClass = JavaPsiFacade.getInstance(getProject()).findClass("Foo", scope); assertNotNull(psiClass); assertTrue(psiClass.isValid()); }