Refactored test.
Added test for Mediator.