Add tests for validator.