@Override
    public Iterator<IndexEntry> readyIndexesIterator() {
        readLock.lock();
        try {
            var readyIndexes = new ArrayList<IndexEntry>();
            for (IndexEntry entry : indexEntries) {
                if (entry.getIndexDescriptor().isReady()) {
                    readyIndexes.add(entry);
                }
            }
            return readyIndexes.iterator();
        } finally {
            readLock.unlock();
        }
    }
@Test
    void readyIndexesIterator() {
        var indexContainer = new IndexEntryContainer();
        var descriptor = new IndexDescriptor(getNameIndexSpec());
        descriptor.setReady(true);
        var nameIndexEntry = new IndexEntryImpl(descriptor);
        indexContainer.add(nameIndexEntry);

        var indexer = new DefaultIndexer(List.of(descriptor), indexContainer);

        var iterator = indexer.readyIndexesIterator();
        assertThat(iterator.hasNext()).isTrue();

        descriptor.setReady(false);
        iterator = indexer.readyIndexesIterator();
        assertThat(iterator.hasNext()).isFalse();
    }