@Override
    public void setElementValue(long index, int bitsPerElement, long value) {
        long whichLong = index >>> 6;
        int whichBit = (int) (index & 0x3F);

        set(whichLong, get(whichLong) | (value << whichBit));

        int bitsRemaining = 64 - whichBit;

        if (bitsRemaining < bitsPerElement)
            set(whichLong + 1, get(whichLong + 1) | (value >>> bitsRemaining));
    }
@Test
    public void doesNotThrowSIGSEGV() {
        FixedLengthElementArray arr = new FixedLengthElementArray(new WastefulRecycler(2, 2), 1793);

        for(int i=0;i<2500;i++) {
            try {
                arr.setElementValue(i, 2, 3);
            } catch(ArrayIndexOutOfBoundsException acceptable) { }
        }
    }