Validation for environment and test for it