added test for addmessage