@Override
    public long clear() {
        return get(clearAsync());
    }
@Test
    public void testClear() {
        RJsonBucket<TestType> al = redisson.getJsonBucket("test", new JacksonCodec<>(TestType.class));
        TestType t = new TestType();
        t.setName("name1");
        al.set(t);
        assertThat(al.clear()).isEqualTo(1);

        TestType n = al.get(new JacksonCodec<>(new TypeReference<TestType>() {}));
        assertThat(n.getName()).isNull();

        TestType t1 = new TestType();
        t1.setName("name1");
        NestedType nt = new NestedType();
        nt.setValues(Arrays.asList("t1", "t2", "t4", "t5", "t6"));
        t1.setType(nt);
        al.set(t1);

        assertThat(al.clear("type.values")).isEqualTo(1);

        TestType n2 = al.get(new JacksonCodec<>(new TypeReference<TestType>() {}));
        n2.setName("name2");
        assertThat(n2.getName()).isEqualTo("name2");
        assertThat(n2.getType().getValues()).isEmpty();
    }