Here is the scenario.
I have a custom field on Contact, which gets auto-populated in a trigger before-insert and before-update. All fine, but this is a field in an Managed Package. Where the package can be installed on an org which has Contacts already in the database. So I wrote a OnInstall batch job that just fetches contacts, where that field is blank, and updates them.
All works perfectly, but now it comes, how am i able to write a Unit Test for this? If I insert a contact in my test context, the field gets populated (because of the trigger), and will not be picked up by my script.