cadonna commented on code in PR #13873:
URL: https://github.com/apache/kafka/pull/13873#discussion_r1250520050


##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/TaskManagerTest.java:
##########
@@ -4521,11 +4387,18 @@ public void shouldListNotPausedTasks() {
         assertEquals(taskManager.notPausedTasks().size(), 0);
     }
 
-    private static void expectRestoreToBeCompleted(final Consumer<byte[], 
byte[]> consumer) {
+    private static void expectAssignmentToBeCalled(final Consumer<byte[], 
byte[]> consumer) {
         final Set<TopicPartition> assignment = singleton(new 
TopicPartition("assignment", 0));
-        expect(consumer.assignment()).andReturn(assignment);
-        consumer.resume(assignment);
-        expectLastCall();
+        when(consumer.assignment()).thenReturn(assignment);
+    }
+
+    private static void verifyResumeWasCalled(final Consumer<byte[], byte[]> 
consumer) {
+        final Set<TopicPartition> assignment = singleton(new 
TopicPartition("assignment", 0));
+        Mockito.verify(consumer, atLeastOnce()).resume(assignment);
+    }
+
+    private static void verifyResumeWasCalledWith(final Consumer<byte[], 
byte[]> consumer, Set<TopicPartition> assignment) {

Review Comment:
   There is a checkstyle error in the builds because you missed the `final` on 
the second parameter here.
   ```suggestion
       private static void verifyResumeWasCalledWith(final Consumer<byte[], 
byte[]> consumer, final Set<TopicPartition> assignment) {
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to