First, you don’t show that you have mocked the “jdbcTemplate” object. That has to be a mock object.
Second, Mockito will do “parameter matching” to determine if the function call specified in the “when” clause will result in the specified return value. I suggest you look at parameter matchers. It’s not clear from this what you “need” to match for your test. I also wonder how this could have compiled, as your test code is passing a Class object for the second parameter, but your CUT is passing a ParameterizedRowMapper.
--
You received this message because you are subscribed to the Google Groups "mockito" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
mockito+u...@googlegroups.com.
To post to this group, send email to moc...@googlegroups.com.
Visit this group at http://groups.google.com/group/mockito.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mockito/d6102bff-f9d6-4461-960f-6687d350dc0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.