when(/* some method call*/).thenReturn(mockFetchReturn).thenReturn(mockFetchReturn2)
.thenReturn(mockFetchReturn3);
This is working fine and I am able to call mocked method three times with different output. But my output list can change for each test scenario and I couldn't find how this can be done in a loop based on different returns. For e.g. If I pass a list of 10 mockFetchReturn3 objects then there should be 10 return statements.