added tests for pubsub