void (int count) { try { Map<TodoIndexEntry, Integer> map = ContainerUtil.getFirstItem(((FileBasedIndexEx)FileBasedIndex.getInstance()).getIndex(TodoIndex.NAME) .getIndexedFileData(FileBasedIndex.getFileId(getVFile())).values()); int result = map == null ? 0 : map.values().stream().mapToInt(o -> o).sum(); assertEquals(count, result); } catch (StorageException e) { throw new RuntimeException(e); } }