Created a helper and refactored tests to use it.