Add publish subscribe unittest