Refactored and added tests to RabbitNewUrlListener