### Question:
AvroRecordBuilder extends RecordImpl.BuilderImpl { @Override public Record build() { return new AvroRecord(super.build()); } AvroRecordBuilder();  AvroRecordBuilder(final Schema providedSchema); @Override Record build();  }### Answer:
@Test void copySchema() { final Schema custom = factory .newSchemaBuilder(baseSchema) .withEntry(factory.newEntryBuilder().withName("custom").withType(STRING).build()) .build(); assertEquals("name/STRING/current name,age/INT/null,address/RECORD/@address,custom/STRING/null", custom .getEntries() .stream() .map(it -> it.getName() + '/' + it.getType() + '/' + it.getRawName()) .collect(joining(","))); }
@Test void copyRecord() { final Schema customSchema = factory .newSchemaBuilder(baseSchema) .withEntry(factory.newEntryBuilder().withName("custom").withType(STRING).build()) .build(); final Record baseRecord = factory .newRecordBuilder(baseSchema) .withString("name", "Test") .withInt("age", 33) .withRecord("address", factory.newRecordBuilder(address).withString("street", "here").withInt("number", 1).build()) .build(); final Record output = factory.newRecordBuilder(customSchema, baseRecord).withString("custom", "added").build(); assertEquals( "AvroRecord{delegate={\"name\": \"Test\", \"age\": 33, \"address\": {\"street\": \"here\", \"number\": 1}, \"custom\": \"added\"}}", output.toString()); }