public <NewV> Record<K, NewV> withValue(final NewV value) {
        return new Record<>(key, value, timestamp, headers);
    }
A convenient way to produce a new record if you only need to change the value.

Copies the attributes of this record with the value replaced.

@param value The value of the result record.
@param <NewV> The type of the new record's value.
@return A new Record instance with all the same attributes (except that the value is replaced).
streams/src/main/java/org/apache/kafka/streams/processor/api/Record.java