I have a method which accepts a list of items. I'd like the mocked method to return a corresponding list of the same size (i.e. List<Results>
)
More generally, is it possible to set the returned value dynamically, with respect to the given input?
The problem is that I have multiple tests for the same method. Test A is for an empty list and test B is for a list with multiple objects. Yet, I have only one @Before
method.