2424import com .arpnetworking .test .CollectorPeriodicMetrics ;
2525import com .arpnetworking .test .StringToRecordParser ;
2626import com .google .common .collect .ImmutableList ;
27+ import com .google .common .collect .Maps ;
2728import org .apache .kafka .clients .consumer .Consumer ;
2829import org .apache .kafka .clients .consumer .ConsumerRecord ;
2930import org .apache .kafka .clients .consumer .ConsumerRecords ;
3031import org .apache .kafka .clients .consumer .MockConsumer ;
31- import org .apache .kafka .clients .consumer .OffsetResetStrategy ;
32+ import org .apache .kafka .clients .consumer .internals . AutoOffsetResetStrategy ;
3233import org .apache .kafka .common .KafkaException ;
3334import org .apache .kafka .common .TopicPartition ;
3435import org .junit .After ;
@@ -327,7 +328,7 @@ private static List<String> createValues(final String prefix, final int num) {
327328
328329 private static MockConsumer <String , String > createMockConsumer (
329330 final ConsumerRecords <String , String > consumerRecords ) {
330- final MockConsumer <String , String > consumer = new MockConsumer <>(OffsetResetStrategy . EARLIEST );
331+ final MockConsumer <String , String > consumer = new MockConsumer <>(AutoOffsetResetStrategy . StrategyType . EARLIEST . toString () );
331332 consumer .assign (Collections .singletonList (new TopicPartition (TOPIC , PARTITION )));
332333 consumer .updateBeginningOffsets (Collections .singletonMap (new TopicPartition (TOPIC , PARTITION ), 0L ));
333334 for (final ConsumerRecord <String , String > record : consumerRecords ) {
@@ -342,7 +343,9 @@ private static ConsumerRecords<String, String> expectedConsumerRecords() {
342343 for (final String value : EXPECTED ) {
343344 records .add (new ConsumerRecord <>(TOPIC , PARTITION , offset ++, "" + offset , value ));
344345 }
345- return new ConsumerRecords <>(Collections .singletonMap (new TopicPartition (TOPIC , PARTITION ), records ));
346+ return new ConsumerRecords <>(
347+ Collections .singletonMap (new TopicPartition (TOPIC , PARTITION ), records ),
348+ Maps .newHashMap ());
346349 }
347350
348351 private static class FillingBlockingQueue extends ArrayBlockingQueue <String > {
0 commit comments