void () { VirtualFile first = tempDirectory.newVirtualDirectory("first/"); VirtualFile second = tempDirectory.newVirtualDirectory("second/"); assertNothingToRescan(); libraryRootsId1.add(first); libraryRootsId2.add(second); assertRescanningLibraries(YES, first, second); assertNothingToRescan(); libraryRootsId1.add(second); assertRescanningLibraries(YES, second); assertNothingToRescan(); libraryRootsId2.add(first); assertRescanningLibraries(YES, first); libraryRootsId1.clear(); libraryRootsId2.clear(); assertNothingToRescanAndFinishIndexing(); libraryRootsId1.add(first); libraryRootsId2.add(second); assertRescanningLibraries(YES, first, second); assertNothingToRescan(); libraryRootsId1.add(second); libraryRootsId2.add(first); assertRescanningLibraries(YES, first, second); }