used helper methods in the tests to be DRY.