Add tests for domain event publisher