### Question:
SqlTimestamp { public LocalDateTime toLocalDateTime() { long epochSecond = floorDiv(epochMicros, MICROSECONDS_PER_SECOND); int microOfSecond = floorMod(epochMicros, MICROSECONDS_PER_SECOND); int nanoOfSecond = (microOfSecond * NANOSECONDS_PER_MICROSECOND) + toIntExact(roundDiv(picosOfMicros, PICOSECONDS_PER_NANOSECOND)); return LocalDateTime.ofEpochSecond(epochSecond, nanoOfSecond, ZoneOffset.UTC); } private  SqlTimestamp(int precision, long epochMicros, int picosOfMicro); static SqlTimestamp fromMillis(int precision, long millis); static SqlTimestamp newInstance(int precision, long epochMicros, int picosOfMicro); int getPrecision(); long getMillis(); long getEpochMicros(); int getPicosOfMicros(); SqlTimestamp roundTo(int precision); @Override boolean equals(Object o); @Override int hashCode(); @JsonValue @Override String toString(); LocalDateTime toLocalDateTime();  }### Answer:
@Test public void testToLocalDateTime() { SqlTimestamp timestamp = newInstance(9, 1367846055987654L, 321_000); assertThat(timestamp.toString()).isEqualTo("2013-05-06 13:14:15.987654321"); assertThat(timestamp.toLocalDateTime()).isEqualTo(LocalDateTime.of(2013, 5, 6, 13, 14, 15, 987_654_321)); timestamp = newInstance(9, -178454744012346L, 321_000); assertThat(timestamp.toString()).isEqualTo("1964-05-06 13:14:15.987654321"); assertThat(timestamp.toLocalDateTime()).isEqualTo(LocalDateTime.of(1964, 5, 6, 13, 14, 15, 987_654_321)); timestamp = newInstance(12, 555_555, 555_555); assertThat(timestamp.toString()).isEqualTo("1970-01-01 00:00:00.555555555555"); assertThat(timestamp.toLocalDateTime()).isEqualTo(LocalDateTime.of(1970, 1, 1, 0, 0, 0, 555_555_556)); timestamp = newInstance(12, -444_445, 555_555); assertThat(timestamp.toString()).isEqualTo("1969-12-31 23:59:59.555555555555"); assertThat(timestamp.toLocalDateTime()).isEqualTo(LocalDateTime.of(1969, 12, 31, 23, 59, 59, 555_555_556)); }