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