private static long randomMillis(long minMillis, long maxMillis, Random rand) {
    return minMillis + (long) ((maxMillis - minMillis) * rand.nextDouble());
  }
Test serializing and deserializing timestamps that can be represented by a number of seconds
from 0 to 2147483647 since the UNIX epoch.
serde/src/test/org/apache/hadoop/hive/serde2/io/TestTimestampWritableV2.java