### Question:
LocalDateTimeArgument implements Argument { @Override public void apply(final int position, final PreparedStatement statement, final StatementContext ctx) throws SQLException { if (value != null) { statement.setTimestamp(position, Timestamp.valueOf(value)); } else { statement.setNull(position, Types.TIMESTAMP); } } LocalDateTimeArgument(final LocalDateTime value); @Override void apply(final int position,
                      final PreparedStatement statement,
                      final StatementContext ctx);  }### Answer:
@Test public void apply() throws Exception { LocalDateTime localDateTime = LocalDateTime.parse("2007-12-03T10:15:30.375"); new LocalDateTimeArgument(localDateTime).apply(1, statement, context); Mockito.verify(statement).setTimestamp(1, Timestamp.valueOf("2007-12-03 10:15:30.375")); }
@Test public void apply_ValueIsNull() throws Exception { new LocalDateTimeArgument(null).apply(1, statement, context); Mockito.verify(statement).setNull(1, Types.TIMESTAMP); }