private static int compareEqualLengthByteArrays(byte[] a, byte[] b) {
    assertEquals(a.length, b.length);
    for (int i = 0; i < a.length; ++i) {
      if (a[i] != b[i]) {
        return (a[i] & 0xff) - (b[i] & 0xff);
      }
    }
    return 0;
  }
Test timestamps that don't necessarily fit between 1970 and 2038. This depends on HIVE-4525
being fixed.
serde/src/test/org/apache/hadoop/hive/serde2/io/TestTimestampWritableV2.java