@Override
    public V getAndExpire(Instant time) {
        return get(getAndExpireAsync(time));
    }
@Test
    public void testGetAndExpire() throws InterruptedException {
        RBucket<Integer> al = redisson.getBucket("test");
        al.set(1);
        assertThat(al.getAndExpire(Duration.ofSeconds(1))).isEqualTo(1);
        Thread.sleep(500);
        assertThat(al.get()).isEqualTo(1);
        Thread.sleep(600);
        assertThat(al.get()).isNull();

        al.set(2);
        assertThat(al.getAndExpire(Instant.now().plusSeconds(1))).isEqualTo(2);
        Thread.sleep(500);
        assertThat(al.get()).isEqualTo(2);
        Thread.sleep(600);
        assertThat(al.get()).isNull();
    }