Copy of Values During Argument Capture?

47 views
Skip to first unread message

James Hurley

unread,
Mar 26, 2021, 3:48:37 PM3/26/21
to mockito

Hi Everyone,

Is there any way to instruct Mockito to perform copies of the arguments it captures?  It would appear that this just retains a reference to the arguments it sees and when such arguments are reused (or altered) than you loose the original capture information.  I've attached a sample Java class that illustrates the problem I'm referring to in a hypothetical situation (my actual test is similar in that the I/0 buffer array is reused for efficiency and exhibits the exact same problem).  Any help is appreciated; thanks!


Example.java
Reply all
Reply to author
Forward
0 new messages