@Override
    public boolean getBoolean(int index) {
        checkIndex(index, 1);
        return buffer.getBoolean(index);
    }
@Test
    public void testGetBoolean() {
        ByteBuf buf = Unpooled.buffer(10);
        while (buf.isWritable()) {
            buf.writeBoolean(true);
        }
        ReplayingDecoderByteBuf buffer = new ReplayingDecoderByteBuf(buf);

        boolean error;
        int i = 0;
        try {
            for (;;) {
                buffer.getBoolean(i);
                i++;
            }
        } catch (Signal e) {
            error = true;
        }

        assertTrue(error);
        assertEquals(10, i);

        buf.release();
    }