Refactor the tests.