refactoring of unit tests