@Test
public void nestedTypeChangesFieldName() {

    FileDescriptor updatedFile = mutateField("HeaderRecord", "num", TestRecordsWithHeaderProto.getDescriptor(),
            field -> field.setName("numb"));
    assertInvalid("field renamed", TestRecordsWithHeaderProto.getDescriptor(), updatedFile);
    RecordMetaDataBuilder metaDataBuilder = RecordMetaData.newBuilder().setRecords(TestRecordsWithHeaderProto.getDescriptor());
    metaDataBuilder.getRecordType("MyRecord").setPrimaryKey(Key.Expressions.field("header").nest(Key.Expressions.concatenateFields("path", "rec_no")));
    RecordMetaData metaData1 = metaDataBuilder.getRecordMetaData();
    RecordMetaData metaData2 = replaceRecordsDescriptor(metaData1, updatedFile);
    assertInvalid("field renamed", metaData1, metaData2);
}