I used the answer provided by @eyescream and modified it a bit.
I set the
OwnerId to a user that is inactive.
My_Object__c myRecord = new My_Object__c()
myRecord.OwnerId = '005xxxxxxxxx'; // id of user that is inactive
This results an a DmlException:
Insert failed. First exception on row 0; first error: INACTIVE_OWNER_OR_USER, operation performed with inactive user [005xxxxxxxxxxx] as owner of 01Ixxxxxxxxxx: 
In my scenario, I have a VF extension that upon save, has a try/catch block. By setting the OwnerId to an inactive user, I can force the record to throw an exception and get code coverage/validation of the try/catch block.
My_Object__c myRecord = new My_Object__c();
MyExtension myExt = new MyExtension (new ApexPages.StandardController(myRecord));
myExt.theRecord.OwnerId = '005xxxxxxxxx'; // id of user that is inactive
PageReference retPage = myExt.mySaveMethod(); // this will return the page reference set in the catch block
A hard coded Id may not work in all environments (e.g. Sandboxes). This can be extended to get the Id of a User that is in the environment you're currently in via a SOQL query.
What I like about this is it should work for every object (except objects that are the detail in a master/detail relationship).