Fix pubsub mediator bug, add test spec.