Is there a way to get a mocked class to return some object no matter what arguments the function is called with?
For example, if one of my parameters’ types did not have the .equals() method properly implemented.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The any() matcher basically says you can have any value or a null. Check out the documentation at mockito, especially the section on Argument Matchers.