@Test
public void testAppendBuff() throws Exception {
int bytesLen = 100;
byte[] bytes = TestUtils.randomByteArray(bytesLen);
Buffer toAppend = Buffer.buffer(bytes);
Buffer b = Buffer.buffer();
b.appendBuffer(toAppend);
assertEquals(b.length(), bytes.length);
assertTrue(TestUtils.byteArraysEqual(bytes, b.getBytes()));
b.appendBuffer(toAppend);
assertEquals(b.length(), 2 * bytes.length);
assertNullPointerException(() -> b.appendBuffer(null));
}