Refactor EventHandler test