private static void checkTimestampWithAndWithoutNanos(Timestamp ts, int nanos)
      throws IOException {
    serializeDeserializeAndCheckTimestamp(ts);

    ts.setNanos(nanos);
    assertEquals(serializeDeserializeAndCheckTimestamp(ts).getNanos(), nanos);
  }
Pad the given byte array with the given number of bytes in the beginning. The padding bytes
deterministically depend on the passed data.
serde/src/test/org/apache/hadoop/hive/serde2/io/TestTimestampWritableV2.java