Refactor the test setup.