assertEquals(b.length(), len);
byte[] copy = new byte[len];
System.arraycopy(bytes, 1, copy, 0, len);
assertTrue(TestUtils.byteArraysEqual(copy, b.getBytes()));
b.appendBytes(bytes, 1, len);
assertEquals(b.length(), 2 * len);
assertNullPointerException(() -> b.appendBytes(null, 1, len));
}