Trying to abstract common logic for DRYer tests