Add a unit test for publishing data.