I'm working on a feature contribution for an open source project that is distributed as a managed package (the Nonprofit Success Pack). The feature synchronizes custom fields across two related records of a custom object. The packaged fields on the object are all currently handled by the managed code - the new functionality is to enable end-users that add custom fields to the managed object to designate those fields to be synchronized in the same way that the packaged fields are.
The thing I'm struggling with is how to write test coverage for the code paths where an unmanaged custom field has been added and designated for synchronization. All the managed fields are involved in the existing automation. Essentially, I need to create test metadata in addition to then putting test data into those test fields.
Because it's an open source project and I want to keep my pull request as lean as possible, I'd prefer not to add the Apex MDAPI class. Any other options?