### Question:
JSR310OffsetDateTimeType extends AbstractJSR310DateTimeType<OffsetDateTime> { @Override public void setValue(PreparedStatement st, int startIndex, OffsetDateTime value) throws SQLException { st.setTimestamp(startIndex, Timestamp.from(value.toInstant()), utc()); } JSR310OffsetDateTimeType();  JSR310OffsetDateTimeType(int type); @Override String getLiteral(OffsetDateTime value); @Override Class<OffsetDateTime> getReturnedClass(); @Nullable @Override OffsetDateTime getValue(ResultSet rs, int startIndex); @Override void setValue(PreparedStatement st, int startIndex, OffsetDateTime value);  }### Answer:
@Test public void set() throws SQLException { OffsetDateTime value = OffsetDateTime.now(); Timestamp ts = Timestamp.from(value.toInstant()); 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 { OffsetDateTime value = OffsetDateTime.now(); Timestamp ts = Timestamp.from(value.toInstant()); PreparedStatement stmt = EasyMock.createNiceMock(PreparedStatement.class); stmt.setTimestamp(1, ts); EasyMock.replay(stmt); new DateTimeType().setValue(stmt, 1, toJoda(value)); EasyMock.verify(stmt); }