If you call this code:
stub.onCall(0).withArgs(42).returns("What's the meaning of life?")
It should raise an exception like the following:
Error: Defining a stub by invoking "stub.onCall(...).withArgs(...)" is not supported. Use "stub.withArgs(...).onCall(...)" to define sequential behavior for calls with certain arguments.