Complete the code to verify a method call with any String argument.
verify(mockObject).someMethod([1]());eq without specifying the exact argument.anyInt() which matches integers, not strings.The anyString() matcher matches any String argument in the method call verification.
Complete the code to verify a method call with an exact argument "test".
verify(mockObject).someMethod([1]("test"));
anyString() which matches any string, not the exact one.any() without specifying the type.The eq("test") matcher verifies the method was called with the exact argument "test".
Fix the error in the verification by choosing the correct matcher for any Integer argument.
verify(mockObject).someMethod([1]());anyString() which matches strings, not integers.eq() without specifying the exact integer.The anyInt() matcher correctly matches any Integer argument in the method call.
Fill both blanks to verify a method called with exact String "hello" and any Integer argument.
verify(mockObject).someMethod([1]("hello"), [2]());
anyString() for the first argument instead of eq().eq() for the second argument without specifying a value.Use eq("hello") to match the exact String and anyInt() to match any Integer argument.
Fill all three blanks to verify a method called with any String, exact Integer 5, and any Boolean argument.
verify(mockObject).someMethod([1](), [2](5), [3]());
anyInt() instead of eq(5) for the exact integer.eq() without argument for the Boolean.Use anyString() for any String, eq(5) for exact Integer 5, and anyBoolean() for any Boolean argument.