added tests for listener.