@Test
public void isFree() throws BufferException {

    ByteBuffer buffer = new ByteBuffer(1);
    Assert.assertTrue(buffer.isFree(0));
    Assert.assertTrue(buffer.isFree(1));
    buffer.add((byte)10);
    Assert.assertFalse(buffer.isFree(1));
}