Support transactional tests
Refactoring