### Question:
JSR310LocalDateType extends AbstractJSR310DateTimeType<LocalDate> { @Override public void setValue(PreparedStatement st, int startIndex, LocalDate value) throws SQLException { Instant i = value.atStartOfDay(ZoneOffset.UTC).toInstant(); st.setDate(startIndex, new Date(i.toEpochMilli()), utc()); } JSR310LocalDateType();  JSR310LocalDateType(int type); @Override String getLiteral(LocalDate value); @Override Class<LocalDate> getReturnedClass(); @Nullable @Override LocalDate getValue(ResultSet rs, int startIndex); @Override void setValue(PreparedStatement st, int startIndex, LocalDate value);  }### Answer:
@Test public void set() throws SQLException { LocalDate value = LocalDate.now(); Date date = new Date(value.atStartOfDay(ZoneOffset.UTC).toInstant().toEpochMilli()); PreparedStatement stmt = EasyMock.createNiceMock(PreparedStatement.class); stmt.setDate(1, date, UTC); EasyMock.replay(stmt); type.setValue(stmt, 1, value); EasyMock.verify(stmt); }
@Test public void jodaSet() throws SQLException { LocalDate value = LocalDate.now(); Date date = new Date(value.atStartOfDay(ZoneOffset.UTC).toInstant().toEpochMilli()); PreparedStatement stmt = EasyMock.createNiceMock(PreparedStatement.class); stmt.setDate(1, date, UTC); EasyMock.replay(stmt); new LocalDateType().setValue(stmt, 1, toJoda(value)); EasyMock.verify(stmt); }