added tests for messaging system