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

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

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

            ss.destroy();

            ss.add(1, 10, TimeUnit.SECONDS);

            Awaitility.await().pollDelay(Duration.ofSeconds(1)).atMost(Duration.ofSeconds(2))
                    .untilAsserted(() -> assertThat(latch.get()).isEqualTo(1));
        }, NOTIFY_KEYSPACE_EVENTS, "Ez");
    }