@Test
public void testReadByteBufferWithMaxLen() throws Exception {
final byte[] pattern = "0123456789ABCDEF".getBytes(Consts.ASCII);
final ReadableByteChannel channel = newChannel(pattern);
final SessionInputBuffer inbuf = new SessionInputBufferImpl(4096, 1024, null, this.allocator);
while (inbuf.fill(channel) > 0) {
}
final ByteBuffer dst = ByteBuffer.allocate(16);
Assert.assertEquals(10, inbuf.read(dst, 10));
dst.flip();
Assert.assertEquals(dst, ByteBuffer.wrap(pattern, 0, 10));