void () { @Language("JAVA") String text = "class S {\n" + "}"; final PsiFile file = configureByText(JavaFileType.INSTANCE, text); PsiClass aClass = ((PsiJavaFile)file).getClasses()[0]; assertNotNull(((PsiFileImpl)file).getStubTree()); final SmartPointerManager manager = getPointerManager(); final SmartPsiElementPointer<PsiClass> pointer1 = createPointer(aClass); Segment range1 = pointer1.getRange(); manager.removePointer(pointer1); final FileASTNode node = file.getNode(); final SmartPsiElementPointer<PsiClass> pointer2 = createPointer(aClass); assertEquals(range1, pointer2.getRange()); assertNotNull(node); }