@Override
    public boolean test(R record) {
        Iterator<Header> headerIterator = record.headers().allWithName(name);
        return headerIterator != null && headerIterator.hasNext();
    }
A predicate which is true for records with at least one header with the configured name.
@param <R> The type of connect record.
connect/transforms/src/main/java/org/apache/kafka/connect/transforms/predicates/HasHeaderKey.java