Tests for utils.py