Refactored tests for type hints