Add tests for transaction failure