Refactor test code a bit.  More unit-sized tests.