Refactors tests.