refactor pubsub tests, add basic subscribe test