Skip to content

Tag: mockito

Mockito when() in parallel stream unexpected result

I was investigating Mockito’s behavior in one of our tests and I didn’t understand its behavior. The following code snippets shows the same behavior : The output I was expecting is prints of 1,2,3 in some order (not nessaseraly sorted) : The output I received : Why I got this output ? Answer This …