@Test
@SuppressWarnings("ObjectEqualsNull")
public void testEquals() {

    assertFalse(buffer.equals(null));
    assertFalse(buffer.equals(new Object()));
    byte[] value = new byte[32];
    buffer.setIndex(0, value.length);
    random.nextBytes(value);
    buffer.setBytes(0, value);
    assertEquals(buffer, wrappedBuffer(value));
    assertEquals(buffer, wrappedBuffer(value).order(LITTLE_ENDIAN));
    value[0] ++;
    assertFalse(buffer.equals(wrappedBuffer(value)));
    assertFalse(buffer.equals(wrappedBuffer(value).order(LITTLE_ENDIAN)));
}