Mockito Iterator Style Stubbing of Consecutive Calls
Sometimes we want to mock different responses for the consecutive calls on the same method. We can create then* methods chain with when() to specify iterator style stubbing in Mockito. Mockito Stubbing Consecutive Calls Let’s….