@Test // That Union[T, NULL] is converted to just T.
  public void convertsNullableEnum() throws SerDeException {
    Schema s = AvroSerdeUtils.getSchemaFor(NULLABLE_ENUM_SCHEMA);

    AvroObjectInspectorGenerator aoig = new AvroObjectInspectorGenerator(s);
    assertEquals(1, aoig.getColumnNames().size());
    assertEquals("nullableEnum", aoig.getColumnNames().get(0));

    // Column types
    assertEquals(1, aoig.getColumnTypes().size());
    TypeInfo typeInfo = aoig.getColumnTypes().get(0);
    assertTrue(typeInfo instanceof PrimitiveTypeInfo);
    PrimitiveTypeInfo pti = (PrimitiveTypeInfo) typeInfo;
    // Verify the union has been hidden and just the main type has been returned.
    assertEquals(PrimitiveObjectInspector.PrimitiveCategory.STRING, pti.getPrimitiveCategory());
  }
Check a given AvroObjectInspectorGenerator to verify that it matches our test
schema's expected map.
@param aoig should already have been initialized, may not be null
@param fieldName name of the contained column, will always fail if null.
serde/src/test/org/apache/hadoop/hive/serde2/avro/TestAvroObjectInspectorGenerator.java