Refactoring of the test class