Add API for adding domain events to a context, Refactor applicationSpecHelper into its own file #2