Record deserialize(Object data) {
    return (Record) fieldDeserializer.value(data);
  }
@Test
  public void testMapDeserialize() {
    Schema schema = new Schema(
        optional(1, "map_type", Types.MapType.ofOptional(2, 3,
            Types.LongType.get(),
            Types.StringType.get()
        ))
    );

    StructObjectInspector inspector = ObjectInspectorFactory.getStandardStructObjectInspector(
        Arrays.asList("map_type"),
        Arrays.asList(
            ObjectInspectorFactory.getStandardMapObjectInspector(
                PrimitiveObjectInspectorFactory.writableLongObjectInspector,
                PrimitiveObjectInspectorFactory.writableStringObjectInspector
            )
        ));

    Deserializer deserializer = new Deserializer.Builder()
        .schema(schema)
        .writerInspector((StructObjectInspector) IcebergObjectInspector.create(schema))
        .sourceInspector(inspector)
        .build();

    Record expected = GenericRecord.create(schema);
    expected.set(0, Collections.singletonMap(1L, "Taylor"));

    MapWritable map = new MapWritable();
    map.put(new LongWritable(1L), new Text("Taylor"));
    Object[] data = new Object[] { map };
    Record actual = deserializer.deserialize(data);

    Assert.assertEquals(expected, actual);
  }