change test to check the number of messages returned