Improve tests for message searching