Add tests for message searching