Added test for sendmessage