add unit test for MessagesTest.cs