DRY'd up tests.