adding unit tests for events