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) {
ArrayList list = new ArrayList(array.length);