Finished a demo for the pub-sub behavior and added a test.