Refactored: test helpers.