In Junit4, I would do something like this:
jdbcTemplate.query(sql, new MapSqlParameterSource("id", id),new MyMapper()); -> Mockito.when(jdbcTemplate.