void () { ConcurrentPackedBitsArray bitSet = ConcurrentPackedBitsArray.create(32); bitSet.set(0, 0xDEAFBEEFL); assertEquals(0xDEAFBEEFL, bitSet.get(0) & 0xFFFFFFFFL); bitSet = ConcurrentPackedBitsArray.create(31); long eadBeef = 0b0101_1110_1010_1111_1011_1110_1110_1111L; bitSet.set(0, eadBeef); assertEquals(eadBeef, bitSet.get(0)); try { bitSet.set(0, 0xDEAFBEEFL); fail(); } catch (IllegalArgumentException ignored) { } }