Refactor all the tests.