@Test
public void testSize1Varint() {

    final int size = 1;
    final int num = 10;
    assertThat(ProtobufVarint32LengthFieldPrepender.computeRawVarint32Size(num), is(size));
    final byte[] buf = new byte[size + num];
    //0000 1010
    buf[0] = 0x0A;
    for (int i = size; i < num + size; ++i) {
        buf[i] = 1;
    }
    assertTrue(ch.writeOutbound(wrappedBuffer(buf, size, buf.length - size)));
    ByteBuf expected = wrappedBuffer(buf);
    ByteBuf actual = ch.readOutbound();
    assertThat(expected, is(actual));
    assertFalse(ch.finish());
    expected.release();
    actual.release();
}