public void set(int index) {
        Preconditions.checkArgument(index < bitLength && index >= 0);

        int byteIndex = index >>> 3;
        byte current = memorySegment.get(offset + byteIndex);
        current |= (1 << (index & BYTE_INDEX_MASK));
        memorySegment.put(offset + byteIndex, current);
    }
@TestTemplate
    void verifyInputIndex2() {
        assertThatThrownBy(() -> bitSet.set(-1)).isInstanceOf(IllegalArgumentException.class);
    }