Design in case anyone can work on it:
When checking to make sure that LastModifiedDate has not been changed, do a check to see if PermissionsCreateAuditFields is a field on the Profile object. One could further query the current user's profile and pass the test if that permission is enabled.
Alternatively (and better), the test should run as a newly-created user with a profile that does not have that permission enabled. First check if the field exists on Profile, and then query an existing profile where that is false, or just query any standard profile if the field is not on Profile.
Design in case anyone can work on it: When checking to make sure that LastModifiedDate has not been changed, do a check to see if PermissionsCreateAuditFields is a field on the Profile object. One could further query the current user's profile and pass the test if that permission is enabled. Alternatively (and better), the test should run as a newly-created user with a profile that does not have that permission enabled. First check if the field exists on Profile, and then query an existing profile where that is false, or just query any standard profile if the field is not on Profile.