void (ThreeState finishIndexingWithStatus, Collection<VirtualFile> roots, Collection<VirtualFile> sourceRoots) { 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<>(); List<VirtualFile> actualSourceRoots = new ArrayList<>(); for (IndexableIteratorBuilder builder : builders) { assertInstanceOf(builder, LibraryIdIteratorBuilder.class); actualRoots.addAll(((LibraryIdIteratorBuilder)builder).getRoots()); actualSourceRoots.addAll(((LibraryIdIteratorBuilder)builder).getSourceRoots()); } assertContainsElements(actualRoots, roots); assertContainsElements(actualSourceRoots, sourceRoots); finishIndexing(finishIndexingWithStatus, statusPair.getSecond(), statusService); }