void () { VirtualFile file = myFixture.configureByFiles("Bar.java", "Foo.txt")[1].getVirtualFile(); rebuildProject(); assertOneElement(getReferentFilesForElementUnderCaret()); myFixture.renameElement(getPsiManager().findFile(file), "Foo.java"); final PsiClass foo = myFixture.findClass("Foo"); assertNotNull(foo); final CompilerReferenceServiceImpl compilerReferenceService = (CompilerReferenceServiceImpl) CompilerReferenceService .getInstance(myFixture.getProject()); compilerReferenceService.getScopeWithCodeReferences(foo); assertOneElement(compilerReferenceService.getDirtyScopeHolder().getAllDirtyModules()); }