@Override
    public int addListener(ObjectListener listener) {
        if (listener instanceof ScoredSortedSetAddListener) {
            return addListener("__keyevent@*:zadd", (ScoredSortedSetAddListener) listener, ScoredSortedSetAddListener::onAdd);
        }
        if (listener instanceof ScoredSortedSetRemoveListener) {
            return addListener("__keyevent@*:zrem", (ScoredSortedSetRemoveListener) listener, ScoredSortedSetRemoveListener::onRemove);
        }
        if (listener instanceof TrackingListener) {
            return addTrackingListener((TrackingListener) listener);
        }

        return super.addListener(listener);
    }
@Test
    public void testAddListener() {
        testWithParams(redisson -> {
            RScoredSortedSet<Integer> ss = redisson.getScoredSortedSet("test");
            AtomicInteger latch = new AtomicInteger();
            int id = ss.addListener(new ScoredSortedSetAddListener() {
                @Override
                public void onAdd(String name) {
                    latch.incrementAndGet();
                }
            });
            ss.add(1, 1);

            Awaitility.await().atMost(Duration.ofSeconds(1)).untilAsserted(() -> {
                assertThat(latch.get()).isEqualTo(1);
            });

            ss.removeListener(id);

            ss.add(1, 1);

            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }

            assertThat(latch.get()).isEqualTo(1);
        }, NOTIFY_KEYSPACE_EVENTS, "Ez");
    }