add unit test for publishing multiple messages