@@ -3152,7 +3152,8 @@ void stopImmediately() throws InterruptedException {
31523152 cfProps .put (ConsumerConfig .DEFAULT_API_TIMEOUT_MS_CONFIG , 45000 ); // wins
31533153 given (cf .getConfigurationProperties ()).willReturn (cfProps );
31543154 final Map <TopicPartition , List <ConsumerRecord <Integer , String >>> records =
3155- Map .of (new TopicPartition ("foo" , 0 ), Arrays .asList (new ConsumerRecord <>("foo" , 0 , 0L , 1 , "foo" ),
3155+ Collections .singletonMap (new TopicPartition ("foo" , 0 ),
3156+ Arrays .asList (new ConsumerRecord <>("foo" , 0 , 0L , 1 , "foo" ),
31563157 new ConsumerRecord <>("foo" , 0 , 1L , 1 , "bar" )));
31573158 ConsumerRecords <Integer , String > consumerRecords = new ConsumerRecords <>(records );
31583159 ConsumerRecords <Integer , String > emptyRecords = new ConsumerRecords <>(Collections .emptyMap ());
@@ -3186,7 +3187,9 @@ void stopImmediately() throws InterruptedException {
31863187 assertThat (latch .await (10 , TimeUnit .SECONDS )).isTrue ();
31873188 container .stop ();
31883189 assertThat (delivered .get ()).isEqualTo (1 );
3189- verify (consumer ).commitSync (eq (Map .of (new TopicPartition ("foo" , 0 ), new OffsetAndMetadata (1L ))), any ());
3190+ verify (consumer ).commitSync (
3191+ eq (Collections .singletonMap (new TopicPartition ("foo" , 0 ), new OffsetAndMetadata (1L ))),
3192+ any ());
31903193 }
31913194
31923195 private Consumer <?, ?> spyOnConsumer (KafkaMessageListenerContainer <Integer , String > container ) {
0 commit comments