Added unit tests to test that an exception will actualliy rollback the database.