added validation and unit test for predefinedMessages