private void verifyMap(final AvroObjectInspectorGenerator aoig, final String fieldName) {
    // Column names
    assertEquals(1, aoig.getColumnNames().size());
    assertEquals(fieldName, aoig.getColumnNames().get(0));

    // Column types
    assertEquals(1, aoig.getColumnTypes().size());
    TypeInfo typeInfo = aoig.getColumnTypes().get(0);
    assertEquals(ObjectInspector.Category.MAP, typeInfo.getCategory());
    assertTrue(typeInfo instanceof MapTypeInfo);
    MapTypeInfo mapTypeInfo = (MapTypeInfo)typeInfo;

    assertEquals("bigint" /* == long in Avro */, mapTypeInfo.getMapValueTypeInfo().getTypeName());
    assertEquals("string", mapTypeInfo.getMapKeyTypeInfo().getTypeName());
  }
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