@Override
    public TimeSeriesEntry<V, L> getAndRemoveEntry(long timestamp) {
        return get(getAndRemoveEntryAsync(timestamp));
    }
@Test
    public void testGetAndRemoveEntry() {
        RTimeSeries<String, String> t = redisson.getTimeSeries("test");
        t.add(1, "10", "100");
        t.add(2, "20");
        t.add(3, "30", "300", Duration.ofSeconds(2));
        t.add(4, "40");

        TimeSeriesEntry<String, String> e1 = t.getAndRemoveEntry(1);
        assertThat(e1.getValue()).isEqualTo("10");
        assertThat(e1.getTimestamp()).isEqualTo(1);
        assertThat(e1.getLabel()).isEqualTo("100");

        TimeSeriesEntry<String, String> e2 = t.getAndRemoveEntry(2);
        assertThat(e2.getValue()).isEqualTo("20");
        assertThat(e2.getTimestamp()).isEqualTo(2);
        assertThat(e2.getLabel()).isNull();

        TimeSeriesEntry<String, String> e3 = t.getAndRemoveEntry(3);
        assertThat(e3.getValue()).isEqualTo("30");
        assertThat(e3.getTimestamp()).isEqualTo(3);
        assertThat(e3.getLabel()).isEqualTo("300");

        TimeSeriesEntry<String, String> e4 = t.getAndRemoveEntry(4);
        assertThat(e4.getValue()).isEqualTo("40");
        assertThat(e4.getTimestamp()).isEqualTo(4);
        assertThat(e4.getLabel()).isNull();
    }