/// <summary>
 /// Removes the handler from the listeners collection
 /// </summary>
 /// <typeparam name="T">Type of the event</typeparam>
 /// <param name="eventHandler">Handler to remove</param>
 /// <exception cref="Exception">When the handler is not registered</exception>
 public void Unsubscribe <T>(IHandleEventsOfType <T> eventHandler) where T : IEvent
 {
     lock (_eventHandlersLock)
     {
         EventHandlers.Remove(typeof(T), (BaseHandleEvents)eventHandler);
     }
 }
        /// <summary>
        /// Setup the service locator
        /// </summary>
        protected override void GivenThat()
        {
            base.GivenThat();

            this._handler = MockIt(this._handler);

            Dep <IServiceLocator>()
            .Stub(sl => sl.GetInstance(this._handler.GetType()))
            .Return(this._handler);
        }
        /// <summary>
        /// Setup the service locator
        /// </summary>
        protected override void GivenThat()
        {
            base.GivenThat();

            this._handler = MockIt(this._handler);

            Dep<IServiceLocator>()
                .Stub(sl => sl.GetInstance(this._handler.GetType()))
                .Return(this._handler);
        }