void (ThreeState finishIndexingWithStatus, VirtualFile... roots) { DependenciesIndexedStatusService statusService = DependenciesIndexedStatusService.getInstance(getProject()); @Nullable Pair<@NotNull Collection<? extends IndexableIteratorBuilder>, @NotNull StatusMark> statusPair; statusPair = statusService.getDeltaWithLastIndexedStatus(); Collection<? extends IndexableIteratorBuilder> builders = statusPair.getFirst(); List<VirtualFile> actualRoots = new ArrayList<>(); for (IndexableIteratorBuilder builder : builders) { assertInstanceOf(builder, ModuleRootsFileBasedIteratorBuilder.class); actualRoots.addAll(((ModuleRootsFileBasedIteratorBuilder)builder).getFiles().getRoots()); } assertContainsElements(actualRoots, roots); finishIndexing(finishIndexingWithStatus, statusPair.getSecond(), statusService); }