Refactor the test.