(Issue 579) Added tests for message search