chore(tests): Reduces code duplication.