public static MemorySegment wrapCopy(byte[] bytes, int start, int end)
            throws IllegalArgumentException {
        checkArgument(end >= start);
        checkArgument(end <= bytes.length);
        MemorySegment copy = allocateUnpooledSegment(end - start);
        copy.put(0, bytes, start, copy.size());
        return copy;
    }
@Test
    void testWrapCopyEmpty() {
        MemorySegmentFactory.wrapCopy(new byte[0], 0, 0);
    }