DRYs up test code