void () { PsiJavaFile file = (PsiJavaFile)myJavaFacade.findClass("AClass", GlobalSearchScope.allScope(getProject())).getContainingFile(); int hash1 = file.getClasses()[0].hashCode(); final SmartPsiElementPointer<PsiClass> pointer1 = createPointer(file.getClasses()[0]); assertNotNull(((PsiFileImpl)file).getStubTree()); GCWatcher.tracking(((PsiFileImpl)file).getStubTree(), file.getClasses()[0]).ensureCollected(); final FileASTNode node = file.getNode(); final SmartPsiElementPointer<PsiClass> pointer2 = createPointer(file.getClasses()[0]); assertFalse(hash1 == file.getClasses()[0].hashCode()); assertEquals(pointer1, pointer2); assertEquals(pointer1.getRange(), pointer2.getRange()); assertNotNull(node); }