@Override
    public long trim(StreamTrimArgs args) {
        return get(trimAsync(args));
    }
@Test
    public void testTrim() {
        RStream<String, String> stream = redisson.getStream("test");

        stream.add(StreamAddArgs.entry("0", "0"));
        stream.add(StreamAddArgs.entry("1", "1"));
        stream.add(StreamAddArgs.entry("2", "2"));

        assertThat(stream.trim(StreamTrimArgs.maxLen(2).noLimit())).isEqualTo(1);

        RStream<String, String> stream2 = redisson.getStream("myStream");
        StreamTrimArgs trimArgs = StreamTrimArgs.maxLen(0).noLimit();
        assertThat(stream2.trim(trimArgs)).isZero();
    }