public void testInputBufferOperations() throws IOException {
ReadableByteChannel channel = new ReadableByteChannelMockup(
new String[] {"stuff;", "more stuff"}, "US-ASCII");
ContentDecoder decoder = new MockupDecoder(channel);
SimpleInputBuffer buffer = new SimpleInputBuffer(4, new DirectByteBufferAllocator());
int count = buffer.consumeContent(decoder);
assertEquals(16, count);
assertTrue(decoder.isCompleted());
byte[] b1 = new byte[5];
int len = buffer.read(b1);
assertEquals("stuff", EncodingUtils.getAsciiString(b1, 0, len));