@Override
            public String toString() {
                return "RecordAndMetadata(" +
                    "offset=" + offset +
                    ", producerId=" + producerId +
                    ", producerEpoch=" + producerEpoch +
                    ", record='" + record.substring(0, 10) + '\'' +
                    ')';
            }
A simple Coordinator implementation that stores the records into a set.
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/runtime/CoordinatorRuntimeTest.java