Applied a little DRY to the tests.