Refactor tests

In preparation for work that requires adding new cases.