I'm creating some tests that includes check that a method associated to an event is being executed at certain conditions. To check that the handler is executed I'm adding a sleep (x ms) to be sure that the handler has finished the execution before check the result. 

Is there any way to subscribe to something that tells me when all the handlers of an event finished executing?