public static void encodeUserEndPoint(final ByteBuffer buf,
                                          final byte[] endPointBytes) {
        if (endPointBytes != null) {
            buf.putInt(endPointBytes.length);
            buf.put(endPointBytes);
        }
    }
@throws TaskAssignmentException if method fails to encode the data
streams/src/test/java/org/apache/kafka/streams/processor/internals/assignment/LegacySubscriptionInfoSerde.java