fix tests, i.e. wait for mediator