Added tests for sensor event handling