Refactoring of unit tests