@@ -89,7 +89,7 @@ public void testCurrentRecordModeCommitsAllRecords() throws InterruptedException
8989
9090 given (consumer .poll (any (Duration .class )))
9191 .willReturn (consumerRecords )
92- .willReturn (new ConsumerRecords <>( Collections . emptyMap () ));
92+ .willReturn (ConsumerRecords . empty ( ));
9393
9494 // When: Start the container and process records
9595 container .start ();
@@ -139,7 +139,7 @@ public void testAllRecordsFilteredStillCommits() throws InterruptedException {
139139
140140 given (consumer .poll (any (Duration .class )))
141141 .willReturn (consumerRecords )
142- .willReturn (new ConsumerRecords <>( Collections . emptyMap () ));
142+ .willReturn (ConsumerRecords . empty ( ));
143143
144144 // When: Start the container
145145 container .start ();
@@ -201,7 +201,7 @@ record -> record.value().contains("skip");
201201
202202 given (consumer .poll (any (Duration .class )))
203203 .willReturn (consumerRecords )
204- .willReturn (new ConsumerRecords <>( Collections . emptyMap () ));
204+ .willReturn (ConsumerRecords . empty ( ));
205205
206206 // When: Start container
207207 container .start ();
@@ -251,7 +251,7 @@ public void testCommitLogging() throws InterruptedException {
251251
252252 given (consumer .poll (any (Duration .class )))
253253 .willReturn (consumerRecords )
254- .willReturn (new ConsumerRecords <>( Collections . emptyMap () ));
254+ .willReturn (ConsumerRecords . empty ( ));
255255
256256 // When
257257 container .start ();
@@ -303,7 +303,7 @@ public void testAckDiscardedParameterBehavior() throws InterruptedException {
303303
304304 given (consumer .poll (any (Duration .class )))
305305 .willReturn (consumerRecords )
306- .willReturn (new ConsumerRecords <>( Collections . emptyMap () ));
306+ .willReturn (ConsumerRecords . empty ( ));
307307
308308 container .start ();
309309 assertThat (processedLatch .await (5 , TimeUnit .SECONDS )).isTrue ();
0 commit comments