### Question:
LocalDateArgument implements Argument { @Override public void apply(int position, PreparedStatement statement, StatementContext ctx) throws SQLException { if (value != null) { statement.setTimestamp(position, Timestamp.valueOf(value.atStartOfDay())); } else { statement.setNull(position, Types.TIMESTAMP); } } LocalDateArgument(LocalDate value); @Override void apply(int position, PreparedStatement statement, StatementContext ctx);  }### Answer:
@Test public void apply() throws Exception { LocalDate localDate = LocalDate.parse("2007-12-03"); new LocalDateArgument(localDate).apply(1, statement, context); Mockito.verify(statement).setTimestamp(1, Timestamp.valueOf("2007-12-03 00:00:00.000")); }
@Test public void apply_ValueIsNull() throws Exception { new LocalDateArgument(null).apply(1, statement, context); Mockito.verify(statement).setNull(1, Types.TIMESTAMP); }