Mockito for functional interface used in jdbc batch update

18 Views Asked by At

I have a method for jdbcBatchUpdate. I need to write a Mockito test case for it. Below is my code:

jdbcTemplate.batchupdate("sql",list,100, (PreparedStatement ps, obj) ->
    { ps.setString(1, object.getstring()) }

I need to cover the statements which are inside of the prepared statement.

I tried mocking ParameterizedPrepareStatementSetter, but it did not work.

0

There are 0 best solutions below