Added tests for the UIEvent class

fixes #2