Refactor a few helper methods out of the LocationTest