}
public void testWriteTo() throws IOException {
StreamByteBuffer byteBuffer = createTestInstance();
ByteArrayOutputStream bytesOut = new ByteArrayOutputStream(byteBuffer.totalBytesUnread());
byteBuffer.writeTo(bytesOut);
byte[] result = bytesOut.toByteArray();
assertTrue(Arrays.equals(testbuffer, result));
}
public void testToInputStreamOneByOne() throws IOException {