@Test
  public void testDeserializeAndSerializeWithNull() throws Exception {
    //null bitmap: 0160 -> 00000001 01100000, 7th, 9th, 10th is null
    BytesWritable in = new BytesWritable(BaseEncoding.base16().lowerCase().decode(
        "01604d61722020202020201b006120646179203d2031332f30332f303820202020202020202020397ca10000000000004300000"
            + "0dd0700000000000048834000000000000000000000000000000000443f110020202020202020202020202020202020202020202"
            + "020202020200000"));
    List<Object> row = (List<Object>) serde.deserialize(in);

    Assert.assertEquals("Mar", ((HiveCharWritable) row.get(0)).toString());
    Assert.assertEquals(null, row.get(7));
    Assert.assertEquals(null, row.get(9));
    Assert.assertEquals(null, row.get(10));

    BytesWritable res = (BytesWritable) serde.serialize(row, serde.getObjectInspector());
    Assert.assertTrue(Arrays.equals(in.copyBytes(), res.copyBytes()));
  }
Test all the data types supported for Teradata Binary Format.
serde/src/test/org/apache/hadoop/hive/serde2/teradata/TestTeradataBinarySerdeGeneral.java