public static GenericRecord convertToAvro(Schema schema, Message message) {
    return AvroSupport.convert(schema, message);
  }
@Test
  public void oneOfSchema() throws IOException {
    Schema.Parser parser = new Schema.Parser();
    Schema convertedSchema = parser.parse(getClass().getClassLoader().getResourceAsStream("schema-provider/proto/oneof_schema.avsc"));
    WithOneOf input = WithOneOf.newBuilder().setLong(32L).build();
    GenericRecord actual = serializeAndDeserializeAvro(ProtoConversionUtil.convertToAvro(convertedSchema, input), convertedSchema);

    GenericData.Record expectedRecord = new GenericData.Record(convertedSchema);
    expectedRecord.put("int", null);
    expectedRecord.put("long", 32L);
    expectedRecord.put("message", null);
    Assertions.assertEquals(expectedRecord, actual);
  }