long[] sorted = new long[array.length];
System.arraycopy(array, 0, sorted, 0, array.length);
Arrays.sort(sorted);
PackedOffsets packed = new PackedOffsets();
packed.pack(array);
assertTrue(Arrays.equals(sorted, packed.toArray()));
}
private ArrayList list(long[] array) {