### Question:
IcebergRecordObjectInspector extends StructObjectInspector { public IcebergRecordObjectInspector(Types.StructType structType, List<ObjectInspector> objectInspectors) { Preconditions.checkArgument(structType.fields().size() == objectInspectors.size()); this.structFields = Lists.newArrayListWithExpectedSize(structType.fields().size()); int position = 0; for (Types.NestedField field : structType.fields()) { ObjectInspector oi = objectInspectors.get(position); IcebergRecordStructField structField = new IcebergRecordStructField(field, oi, position); structFields.add(structField); position++; } } IcebergRecordObjectInspector(Types.StructType structType, List<ObjectInspector> objectInspectors); static IcebergRecordObjectInspector empty(); @Override List<? extends StructField> getAllStructFieldRefs(); @Override StructField getStructFieldRef(String name); @Override Object getStructFieldData(Object o, StructField structField); @Override List<Object> getStructFieldsDataAsList(Object o); @Override String getTypeName(); @Override Category getCategory(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testIcebergRecordObjectInspector() { Schema schema = new Schema( required(1, "integer_field", Types.IntegerType.get()), required(2, "struct_field", Types.StructType.of( Types.NestedField.required(3, "string_field", Types.StringType.get()))) ); Record record = RandomGenericData.generate(schema, 1, 0L).get(0); Record innerRecord = record.get(1, Record.class); StructObjectInspector soi = (StructObjectInspector) IcebergObjectInspector.create(schema); Assert.assertEquals(ImmutableList.of(record.get(0), record.get(1)), soi.getStructFieldsDataAsList(record)); StructField integerField = soi.getStructFieldRef("integer_field"); Assert.assertEquals(record.get(0), soi.getStructFieldData(record, integerField)); StructField structField = soi.getStructFieldRef("struct_field"); Object innerData = soi.getStructFieldData(record, structField); Assert.assertEquals(innerRecord, innerData); StructObjectInspector innerSoi = (StructObjectInspector) structField.getFieldObjectInspector(); StructField stringField = innerSoi.getStructFieldRef("string_field"); Assert.assertEquals(ImmutableList.of(innerRecord.get(0)), innerSoi.getStructFieldsDataAsList(innerRecord)); Assert.assertEquals(innerRecord.get(0), innerSoi.getStructFieldData(innerData, stringField)); }