Snippets tagged “thenanswer”
1 snippet uses this tag.
- Making a mocked method return an argument that was passed to itJava
To make a mocked method return an argument that was passed to it, you can use the Mockito.when method and pass it the argument that you want to return as the answer.