Add tests for validate.py