Refactor tests. Less boilerplate, more DRY.