Validations and unit testing