Timestamp t2 = new Timestamp(-1L);
t1.setTime(Long.MIN_VALUE);
t2.setDate(Integer.MIN_VALUE);
assertEquals(1, t1.compareTo(t2));
assertEquals(-1, t2.compareTo(t1));
t1.setTime(Long.MAX_VALUE);
t2.setTime(Long.MAX_VALUE - 1);
assertEquals(1, t1.compareTo(t2));
assertEquals(-1, t2.compareTo(t1));