Added validations for status and wrote tests