divijvaidya commented on code in PR #14679:
URL: https://github.com/apache/kafka/pull/14679#discussion_r1378751617


##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/StandbyTaskTest.java:
##########
@@ -201,49 +201,37 @@ public void shouldTransitToRunningAfterInitialization() {
         task.initializeIfNeeded();
 
         assertEquals(RUNNING, task.state());
-
-        EasyMock.verify(stateManager);
     }
 
     @Test
     public void shouldThrowIfCommittingOnIllegalState() {
-        EasyMock.replay(stateManager);
         task = createStandbyTask();
         task.suspend();
         task.closeClean();
 
         assertThrows(IllegalStateException.class, task::prepareCommit);
     }
 
-
     @Test
     public void shouldAlwaysCheckpointStateIfEnforced() {
-        stateManager.flush();
-        EasyMock.expectLastCall().once();
-        stateManager.checkpoint();
-        EasyMock.expectLastCall().once();
-        
EasyMock.expect(stateManager.changelogOffsets()).andReturn(Collections.emptyMap()).anyTimes();
-        EasyMock.replay(stateManager);
+        doNothing().when(stateManager).flush();

Review Comment:
   can we verify that it was only called once? Right now even if it is invoked 
twice, Mockito won't throw an error. (please correct me if I am wrong)



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to