add test for gadget.publish and .subscribe