Test publisher and subscriber working