@Test
public void isEmpty() throws BufferException {

    ByteBuffer buffer = new ByteBuffer();
    Assert.assertTrue(buffer.isEmpty());
    // fill it with some data
    buffer.add((byte)10);
    Assert.assertFalse(buffer.isEmpty());
}