public List<StreamThread> streamThreads() {
        return new ArrayList<>(threads);
    }
This class allows to access the {@link KafkaStreams} a {@link StreamThread.StateListener} object.
streams/src/test/java/org/apache/kafka/streams/KafkaStreamsWrapper.java