void deserializeAndVerify(
      Output output, DeserializeRead deserializeRead,
      VectorRandomRowSource source, Object[] expectedRow)
      throws HiveException, IOException {

    deserializeRead.set(output.getData(),  0, output.getLength());
    TypeInfo[] typeInfos = source.typeInfos();
    for (int i = 0; i < typeInfos.length; i++) {
      Object expected = expectedRow[i];
      TypeInfo typeInfo = typeInfos[i];
      verifyRead(deserializeRead, typeInfo, expected);
    }
    assertTrue(deserializeRead.isEndOfInputReached());
  }
Unit test for the vectorized serialize and deserialize row.
ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorSerDeRow.java