public class TestRecord<K,V> extends Object
TopologyTestDriver.
 If [a] record does not contain a timestamp,
 TestInputTopic will auto advance it's time when the record is piped.| Constructor and Description | 
|---|
| TestRecord(ConsumerRecord<K,V> record)Create a  TestRecordfrom aConsumerRecord. | 
| TestRecord(K key,
          V value)Creates a record. | 
| TestRecord(K key,
          V value,
          Headers headers)Creates a record. | 
| TestRecord(K key,
          V value,
          Headers headers,
          Instant recordTime)Creates a record. | 
| TestRecord(K key,
          V value,
          Headers headers,
          Long timestampMs)Creates a record. | 
| TestRecord(K key,
          V value,
          Instant recordTime)Creates a record. | 
| TestRecord(ProducerRecord<K,V> record)Create a  TestRecordfrom aProducerRecord. | 
| TestRecord(V value)Create a record with  nullkey. | 
public TestRecord(K key, V value, Headers headers, Instant recordTime)
key - The key that will be included in the recordvalue - The value of the recordheaders - the record headers that will be included in the recordrecordTime - The timestamp of the record.public TestRecord(K key, V value, Headers headers, Long timestampMs)
key - The key that will be included in the recordvalue - The value of the recordheaders - the record headers that will be included in the recordtimestampMs - The timestamp of the record, in milliseconds since the beginning of the epoch.public TestRecord(K key, V value, Instant recordTime)
key - The key of the recordvalue - The value of the recordrecordTime - The timestamp of the record as Instant.public TestRecord(K key, V value, Headers headers)
key - The key of the recordvalue - The value of the recordheaders - The record headers that will be included in the recordpublic TestRecord(K key, V value)
key - The key of the recordvalue - The value of the recordpublic TestRecord(V value)
null key.value - The value of the recordpublic TestRecord(ConsumerRecord<K,V> record)
TestRecord from a ConsumerRecord.record - The vpublic TestRecord(ProducerRecord<K,V> record)
TestRecord from a ProducerRecord.record - The record contentspublic Headers headers()
public K key()
null if no key is specified).public V value()
public Long timestamp()
public Headers getHeaders()
public K getKey()
public V getValue()
public Instant getRecordTime()