DRYed out the tests a little.