void () { @Language("JAVA") String text = "class X{}"; PsiFile file = configureByText(JavaFileType.INSTANCE, text); PsiClass aClass = ((PsiClassOwner)file).getClasses()[0]; SmartPointerManagerImpl smartPointerManager = getPointerManager(); SmartPsiElementPointer pointer1 = createPointer(aClass); SmartPsiElementPointer pointer2 = createPointer(aClass); assertSame(pointer1, pointer2); assertNotNull(pointer1.getRange()); smartPointerManager.removePointer(pointer2); assertNotNull(pointer1.getRange()); smartPointerManager.removePointer(pointer1); assertNull(pointer1.getRange()); }