Validation and Unit testing