DRY-ify tests.