Closing listener in test