@Test
public void testInputBufferOperations() throws IOException {
final ReadableByteChannel channel = new ReadableByteChannelMock(
new String[] {"stuff;", "more stuff"}, Consts.ASCII);
final ContentDecoder decoder = new ContentDecoderMock(channel);
final SimpleInputBuffer buffer = new SimpleInputBuffer(4, DirectByteBufferAllocator.INSTANCE);
final int count = buffer.consumeContent(decoder);
Assert.assertEquals(16, count);
Assert.assertTrue(decoder.isCompleted());
final byte[] b1 = new byte[5];
int len = buffer.read(b1);
Assert.assertEquals("stuff", EncodingUtils.getAsciiString(b1, 0, len));