I have a compile problem which is strange. I am not able to fix this. The same peice of code works fine in another project
org.mockito.Mockito.when(jdbcTemplate.
Check for the dependency (spring jars) for version mismatch between projects
Since BeanPropertyRowMapper<T> is a generic interface, you should invoke any()
like this:
Mockito.when(jdbcTemplate.query(Matchers.anyString(),
Matchers.<BeanPropertyRowMapper<MyClass>>any())).thenReturn(SOMELIST);