code fix
added unit test for events listener