Unit tests for publish event