Do the refactoring of the tests