use of org.apache.gobblin.kafka.client.Kafka08ConsumerClient.Kafka08ConsumerRecord in project incubator-gobblin by apache.
the class KafkaDeserializerExtractorTest method getMockMessageAndOffset.
private ByteArrayBasedKafkaRecord getMockMessageAndOffset(ByteBuffer payload) {
MessageAndOffset mockMessageAndOffset = mock(MessageAndOffset.class);
Message mockMessage = mock(Message.class);
when(mockMessage.payload()).thenReturn(payload);
when(mockMessageAndOffset.message()).thenReturn(mockMessage);
return new Kafka08ConsumerRecord(mockMessageAndOffset, "test", 0);
}
Aggregations