Added tests and validations for has_many and belongs to for messages
Added tests and validations for has_many and belongs to for messages