Add tests for listener