@Test
public void testGetUnsignedByte() {

    ByteBuf buf = Unpooled.copiedBuffer("TestBuffer", CharsetUtil.ISO_8859_1);
    ReplayingDecoderByteBuf buffer = new ReplayingDecoderByteBuf(buf);
    boolean error;
    int i = 0;
    try {
        for (;;) {
            buffer.getUnsignedByte(i);
            i++;
        }
    } catch (Signal e) {
        error = true;
    }
    assertTrue(error);
    assertEquals(10, i);
    buf.release();
}