Add test for search message's function