Refactored Unit tests