Fixed test for deviceEventListener.

I didn't realize how it was supposed to work.
Related to issue #7