Added unit tests for events