reorganizing unit test helpers to make future tests easier to set up