added test for getMessages