assertEquals(HexUtils.byteArrayToHexString(expected), HexUtils.byteArrayToHexString(actual));
}
@Test
public void testBufferAdd() throws Exception {
CircularBuffer buffer = new CircularBuffer(payload.length * 2);
buffer.write(payload, 0, payload.length);
assertEquals(payload.length, buffer.availableForWrite());
buffer.write(payload, 0, payload.length);
assertEquals(0, buffer.availableForWrite());
buffer.write(payload, 0, payload.length);
assertEquals(0, buffer.availableForWrite());
}