Add event handler unittest