DRY'd out test