You are right, this exception is thrown because the stubbing setup does not match the objects that were passed during test execution.
.toString() represents this inside the Stacktrace:
[email protected]__, "603b408b-4eb2-4d01-ab90-d30277874415" [email protected]__, "603b408b-4eb2-4d01-ab90-d30277874415"
id argument does match, but not the instance of your
You can solve this by a more open stub setup, that does not check on equality of the
Make sure to use
org.mockito.ArgumentMatchers for both
CLICK HERE to find out more related problems solutions.