Refactor test.