Fixed problem with the setEventObj method and added another test case for it.