More refactoring of tests.