PreciseTimestamp implements Timestamp { @Override public Instant toInstant() { return instant; } PreciseTimestamp();  PreciseTimestamp(final long milliseconds, final long nanoseconds); @Override Date toDate(); @Override Instant toInstant(); @Override java.sql.Timestamp toSqlTimestamp(); @Override long calcDifferenceInNanoseconds(final Timestamp other);  }
@Test public void convertingToInstant() { PreciseTimestamp timestamp = create(LocalDate.of(1985, 6, 3), LocalTime.of(12, 30, 50, 123_456_789)); assertThat(timestamp.toInstant()).isEqualTo(asInstant(LocalDate.of(1985, 6, 3), LocalTime.of(12, 30, 50, 123_456_789))); }