@Test
public void occurrences() throws BufferException {

    ByteBuffer buffer = new ByteBuffer(TEST_BYTES1);
    Assert.assertEquals(-1, buffer.occurrences(new byte[0]));
    Assert.assertEquals(3, buffer.occurrences(TEST_L));
    Assert.assertEquals(1, buffer.occurrences(TEST_LL));
    Assert.assertEquals(1, buffer.occurrences(TEST_H));
    byte[] tmp = {'A'};
    Assert.assertEquals(0, buffer.occurrences(tmp));
}