### Question:
JSR310LocalDateTimeType extends AbstractJSR310DateTimeType<LocalDateTime> { @Override public void setValue(PreparedStatement st, int startIndex, LocalDateTime value) throws SQLException { st.setTimestamp(startIndex, Timestamp.from(value.toInstant(ZoneOffset.UTC)), utc()); } JSR310LocalDateTimeType();  JSR310LocalDateTimeType(int type); @Override String getLiteral(LocalDateTime value); @Override Class<LocalDateTime> getReturnedClass(); @Nullable @Override LocalDateTime getValue(ResultSet rs, int startIndex); @Override void setValue(PreparedStatement st, int startIndex, LocalDateTime value);  }### Answer:
@Test public void set() throws SQLException { LocalDateTime value = LocalDateTime.now(); Timestamp ts = Timestamp.from(value.toInstant(ZoneOffset.UTC)); PreparedStatement stmt = EasyMock.createNiceMock(PreparedStatement.class); stmt.setTimestamp(1, ts, UTC); EasyMock.replay(stmt); type.setValue(stmt, 1, value); EasyMock.verify(stmt); }
@Test public void jodaSet() throws SQLException { LocalDateTime value = LocalDateTime.now(); Timestamp ts = Timestamp.from(value.toInstant(ZoneOffset.UTC)); PreparedStatement stmt = EasyMock.createNiceMock(PreparedStatement.class); stmt.setTimestamp(1, ts, UTC); EasyMock.replay(stmt); new LocalDateTimeType().setValue(stmt, 1, toJoda(value)); EasyMock.verify(stmt); }