test unsubscribing inside a listener