Refactor tests to remove duplication.

It's possible these went one step too far in removing duplication.  Alas!