Added "TestTaskStateChangedEventHandling" test case for task events