Dear Mockito lovers,
I pray that you are all well.
I had a quick question: the model in Mockito clearly is that you capture the arguments, and then verify them.
I was using Mockito in a dynamic environment, and the question occurred to me: when Mockito captures the argument, does it store a reference to the argument, or does it somehow make a copy?
This is relevant because in a dynamic environment, the argument obviously might have changed between the time the invocation was captured and the time when you are attempting to run the matcher against it during verification. I'm interested in what the object looked like at the time the invocation was made, not later when I'm running the verification.
I know that this use case may be a little outside of the anticipated use cases of Mockito, but I thought I'd put the question to see if anyone had come across this issue before and if there was a standard way around it.
Fr Jeremy Krieg