@VisibleForTesting
  Schema convertSchema(org.apache.avro.Schema schema) {
    return Schema.of(getFields(schema));
  }
@Test
  void convertSchema_nestedFields() {
    com.google.cloud.bigquery.Schema expected = com.google.cloud.bigquery.Schema.of(
        Field.newBuilder("nestedOne", StandardSQLTypeName.STRUCT,
                Field.newBuilder("nestedOptionalInt", StandardSQLTypeName.INT64).setMode(Field.Mode.NULLABLE).build(),
                Field.newBuilder("nestedRequiredDouble", StandardSQLTypeName.FLOAT64).setMode(Field.Mode.REQUIRED).build(),
                Field.newBuilder("nestedTwo", StandardSQLTypeName.STRUCT,
                    Field.newBuilder("doublyNestedString", StandardSQLTypeName.STRING).setMode(Field.Mode.NULLABLE).build()).setMode(Field.Mode.REQUIRED).build())
            .setMode(Field.Mode.NULLABLE).build());

    Assertions.assertEquals(expected, SCHEMA_RESOLVER.convertSchema(NESTED_FIELDS));
  }