@Override
    public AutoClaimResult<K, V> autoClaim(String groupName, String consumerName, long idleTime, TimeUnit idleTimeUnit, StreamMessageId startId, int count) {
        return get(autoClaimAsync(groupName, consumerName, idleTime, idleTimeUnit, startId, count));
    }
@Test
    public void testAutoClaim() throws InterruptedException {
        RStream<String, String> stream = redisson.getStream("test");

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

        stream.createGroup(StreamCreateGroupArgs.name("testGroup"));

        StreamMessageId id1 = stream.add(StreamAddArgs.entry("1", "1"));
        StreamMessageId id2 = stream.add(StreamAddArgs.entry("2", "2"));

        Map<StreamMessageId, Map<String, String>> s = stream.readGroup("testGroup", "consumer1", StreamReadGroupArgs.neverDelivered());
        assertThat(s.size()).isEqualTo(2);

        StreamMessageId id3 = stream.add(StreamAddArgs.entry("3", "33"));
        StreamMessageId id4 = stream.add(StreamAddArgs.entry("4", "44"));

        Map<StreamMessageId, Map<String, String>> s2 = stream.readGroup("testGroup", "consumer2", StreamReadGroupArgs.neverDelivered());
        assertThat(s2.size()).isEqualTo(2);

        Thread.sleep(5);

        AutoClaimResult<String, String> res = stream.autoClaim("testGroup", "consumer1", 1, TimeUnit.MILLISECONDS, id3, 2);
        assertThat(res.getMessages().size()).isEqualTo(2);
        for (Map.Entry<StreamMessageId, Map<String, String>> entry : res.getMessages().entrySet()) {
            assertThat(entry.getValue().keySet()).containsAnyOf("3", "4");
            assertThat(entry.getValue().values()).containsAnyOf("33", "44");
        }
    }