void (long eh, int len, ByteBuffer bb) { bb.order(LITTLE_ENDIAN); assertThat(Xxh3.hash(bb)).isEqualTo(eh); ByteBuffer bb2 = ByteBuffer.allocate(len + 2).order(LITTLE_ENDIAN); ((Buffer)bb2).position(1); bb2.put(bb); assertThat(Xxh3.hash(bb2, 1, len)).isEqualTo(eh); ((Buffer)bb.order(BIG_ENDIAN)).clear(); assertThat(Xxh3.hash(bb)).isEqualTo(eh); bb2.order(BIG_ENDIAN); assertThat(Xxh3.hash(bb2, 1, len)).isEqualTo(eh); ((Buffer)bb.order(nativeOrder())).clear(); }