Improved testing for database inserts.