@Test
public void testWrite() throws IOException {

    byte[] src = "HELLO MINA!".getBytes();
    ByteBufferOutputStream bbos = new ByteBufferOutputStream(1024);
    bbos.write(src);
    bbos.close();
    assertEquals(src.length, bbos.getByteBuffer().remaining());
    assertEquals(ByteBuffer.wrap(src), bbos.getByteBuffer());
}