@Override
    public SeekableByteChannel getChannel() {
        return new RedissonByteChannel();
    }
@Test
    public void testChannelOverwrite() throws IOException {
        RBinaryStream stream = redisson.getBinaryStream("test");
        SeekableByteChannel c = stream.getChannel();
        assertThat(c.write(ByteBuffer.wrap(new byte[]{1, 2, 3, 4, 5, 6, 7}))).isEqualTo(7);
        c.position(3);
        assertThat(c.write(ByteBuffer.wrap(new byte[]{0, 9, 10}))).isEqualTo(3);
        assertThat(c.position()).isEqualTo(6);

        ByteBuffer b = ByteBuffer.allocate(3);
        int r = c.read(b);
        assertThat(c.position()).isEqualTo(7);
        assertThat(r).isEqualTo(1);
        b.flip();
        byte[] bb = new byte[b.remaining()];
        b.get(bb);
        assertThat(bb).isEqualTo(new byte[]{7});

        c.position(0);
        ByteBuffer state = ByteBuffer.allocate(7);
        c.read(state);
        byte[] bb1 = new byte[7];
        state.flip();
        state.get(bb1);
        assertThat(bb1).isEqualTo(new byte[]{1, 2, 3, 0, 9, 10, 7});
    }