private void deserializeAndSerializeHiveAvro(HBaseSerDe serDe, Result r, Put p,
      Object[] expectedFieldsData, String expectedDeserializedAvroString)
      throws SerDeException, IOException {
    StructObjectInspector soi = (StructObjectInspector) serDe.getObjectInspector();

    List<? extends StructField> fieldRefs = soi.getAllStructFieldRefs();

    Object row = serDe.deserialize(new ResultWritable(r));

    for (int j = 0; j < fieldRefs.size(); j++) {
      Object fieldData = soi.getStructFieldData(row, fieldRefs.get(j));
      assertNotNull(fieldData);
      assertEquals(expectedFieldsData[j], fieldData.toString().trim());
    }

    assertEquals(expectedDeserializedAvroString, SerDeUtils.getJSONString(row, soi));

    // Now serialize
    Put put = ((PutWritable) serDe.serialize(row, soi)).getPut();

    assertNotNull(put);
    assertEquals(p.getFamilyCellMap(), put.getFamilyCellMap());
  }
Since there are assertions in the code, when running this test it throws an assertion error
and not the error in a production setup. The Properties.java object that is passed to the serDe
initializer, is passed with empty value "" for "columns.comments" key for hbase backed tables.
hbase-handler/src/test/org/apache/hadoop/hive/hbase/TestHBaseSerDe.java