public Iterator<S> stateIterator() {
        return map.values().iterator();
    }
Returns an unmodifiable view of the partitions in random order.
changes to this PartitionStates instance will be reflected in this view.
clients/src/main/java/org/apache/kafka/common/internals/PartitionStates.java