private static TimestampWritableV2 fromIntAndVInts(int i, long... vints) throws IOException {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    DataOutputStream dos = new DataOutputStream(baos);
    dos.writeInt(i);
    if ((i & HAS_DECIMAL_MASK) != 0) {
      for (long vi : vints) {
        WritableUtils.writeVLong(dos, vi);
      }
    }
    byte[] bytes = baos.toByteArray();
    TimestampWritableV2 tsw = deserializeFromBytes(bytes);
    assertEquals(toList(bytes), toList(serializeToBytes(tsw)));
    return tsw;
  }
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