@Test
void testAppend() {

    ByteBuffer to = BufferUtils.allocate(8);
    ByteBuffer from = BufferUtils.toBuffer("12345");
    BufferUtils.append(to, from.array(), 0, 3);
    assertEquals("123", BufferUtils.toString(to));
    BufferUtils.append(to, from.array(), 3, 2);
    assertEquals("12345", BufferUtils.toString(to));
    assertThrows(BufferOverflowException.class, () -> {
        BufferUtils.append(to, from.array(), 0, 5);
    });
}