Added tests and validations for messages