Moving the test to detected event to dispose before the test to detect the event to happen