concept different response in category java

appears as: different responses
Java Testing with Spock

This is an excerpt from Manning's book Java Testing with Spock.

6.2.3. Using sequential stubs with different responses for each method call

Listing 6.5 showed how to differentiate the stub response based on the argument. This is one dimension of different responses. The other dimension is to stub different responses depending on the number of times a method is called.