@Nightly
public void testBlockReaderOverflow() throws IOException {
final long valueCount = _TestUtil.nextLong(random(), 1L + Integer.MAX_VALUE, (long) Integer.MAX_VALUE * 2);
final int blockSize = 1 << _TestUtil.nextInt(random(), 20, 22);
final Directory dir = newDirectory();
final IndexOutput out = dir.createOutput("out.bin", IOContext.DEFAULT);
final BlockPackedWriter writer = new BlockPackedWriter(out, blockSize);
long value = random().nextInt() & 0xFFFFFFFFL;
long valueOffset = _TestUtil.nextLong(random(), 0, valueCount - 1);
for (long i = 0; i < valueCount; ) {
assertEquals(i, writer.ord());