Unit tests refactoring