tests refactored to make use of helper methods for ease of maintenace and reading of code