void () { VirtualFile file = ScratchRootType.getInstance().createScratchFile(getProject(), "Foo.java", JavaLanguage.INSTANCE, "class Foo {}"); CountingFileBasedIndexExtension.registerCountingFileBasedIndex(getTestRootDisposable()); FileBasedIndex.getInstance().getFileData(CountingFileBasedIndexExtension.getINDEX_ID(), file, getProject()); assertTrue(CountingFileBasedIndexExtension.getCOUNTER().get() > 0); CountingFileBasedIndexExtension.getCOUNTER().set(0); FileBasedIndex.getInstance().requestReindex(file); FileBasedIndex.getInstance().getFileData(CountingFileBasedIndexExtension.getINDEX_ID(), file, getProject()); assertTrue(CountingFileBasedIndexExtension.getCOUNTER().get() > 0); }