Fix #232: move ctx creation to protected function, override than in test
Merge pull request #237 from bserdar/mediator-is-thread-safe-again

Fix #232: move ctx creation to protected function, override than in test