public Object getField(Object record, String name, int position) {
    return ((IndexedRecord) record).get(position);
  }
@Test
  void getEmptySchemaField() throws Exception {
    assertThrows(AvroRuntimeException.class, () -> {
      Schema s = Schema.createRecord("schemaName", "schemaDoc", "namespace", false);
      s.getField("foo");
    });
  }