Updated test to include events handling and firing.