### Question:
DateUtil { public static Timestamp getTimestamp(long millis, int nanos) { if (nanos > MAX_ALLOWED_NANOS || nanos < 0) { throw new IllegalArgumentException("nanos > " + MAX_ALLOWED_NANOS + " or < 0"); } Timestamp ts = new Timestamp(millis); if (ts.getNanos() + nanos > MAX_ALLOWED_NANOS) { int millisToNanosConvertor = BigDecimal.valueOf(MILLIS_TO_NANOS_CONVERTOR).intValue(); int overFlowMs = (ts.getNanos() + nanos) / millisToNanosConvertor; int overFlowNanos = (ts.getNanos() + nanos) - (overFlowMs * millisToNanosConvertor); ts = new Timestamp(millis + overFlowMs); ts.setNanos(ts.getNanos() + overFlowNanos); } else { ts.setNanos(ts.getNanos() + nanos); } return ts; } private  DateUtil(); @NonNull static PDataCodec getCodecFor(PDataType type); static TimeZone getTimeZone(String timeZoneId); static DateTimeParser getDateTimeParser(String pattern, PDataType pDataType, String timeZoneId); static DateTimeParser getDateTimeParser(String pattern, PDataType pDataType); static Format getDateFormatter(String pattern); static Format getDateFormatter(String pattern, String timeZoneID); static Format getTimeFormatter(String pattern, String timeZoneID); static Format getTimestampFormatter(String pattern, String timeZoneID); static Date parseDate(String dateValue); static Time parseTime(String timeValue); static Timestamp parseTimestamp(String timestampValue); static Timestamp getTimestamp(long millis, int nanos); static Timestamp getTimestamp(BigDecimal bd); static final String DEFAULT_TIME_ZONE_ID; static final String LOCAL_TIME_ZONE_ID; static final String DEFAULT_MS_DATE_FORMAT; static final Format DEFAULT_MS_DATE_FORMATTER; static final String DEFAULT_DATE_FORMAT; static final Format DEFAULT_DATE_FORMATTER; static final String DEFAULT_TIME_FORMAT; static final Format DEFAULT_TIME_FORMATTER; static final String DEFAULT_TIMESTAMP_FORMAT; static final Format DEFAULT_TIMESTAMP_FORMATTER; }### Answer:
@Test public void testDemonstrateSetNanosOnTimestampLosingMillis() { Timestamp ts1 = new Timestamp(120055); ts1.setNanos(60); Timestamp ts2 = new Timestamp(120100); ts2.setNanos(60); assertTrue(ts1.equals(ts2)); ts1 = DateUtil.getTimestamp(120055, 60); ts2 = DateUtil.getTimestamp(120100, 60); assertFalse(ts1.equals(ts2)); assertTrue(ts2.after(ts1)); }