Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Cfo2K4u4rF18QsPXPFnytf
12 lines
511 B
Plaintext
12 lines
511 B
Plaintext
org.mockito.exceptions.base.MockitoException:
|
|
No argument value was captured!
|
|
You might have forgotten to use argument.capture() in verify()...
|
|
...or you used capture() in stubbing but stubbed method was not called.
|
|
Be aware that it is recommended to use capture() only with verify()
|
|
|
|
Examples of correct argument capturing:
|
|
ArgumentCaptor<Person> argument = ArgumentCaptor.forClass(Person.class);
|
|
verify(mock).doSomething(argument.capture());
|
|
assertEquals("John", argument.getValue().getName());
|
|
|