public static InternalProcessorContext asInternalProcessorContext(final ProcessorContext context) {
        if (context instanceof InternalProcessorContext) {
            return (InternalProcessorContext) context;
        } else {
            throw new IllegalArgumentException(
                "This component requires internal features of Kafka Streams and must be disabled for unit tests."
            );
        }
    }
Should be removed as part of KAFKA-10217
streams/src/main/java/org/apache/kafka/streams/processor/internals/ProcessorContextUtils.java