use spy obj for checking triggered events