public void testCompound() { long[][] valuesArray = {{0, 1, 2, 3, 4, 5, 6}, {10, 11, 12, 13, 14, 15, 16}}; int[][] indicesToRemove = {{0, 4, 1, 5}, {2, 6, 1}, {0, 6, 1, 2}}; for (long[] values : valuesArray) { LongArray array = LongArray.create(values); for (int[] indices : indicesToRemove) { IntList removedIndices = LongListRemovingDecorator.prepareUnsortedIndices(indices); LongListRemovingDecorator rem = createFromPrepared(array, removedIndices); LongArray expected = LongArray.copy(values); removedIndices = IntCollections.toSorted(false, new IntArray(indices)); expected.removeAllAtSorted(removedIndices.iterator()); CHECK.order(expected, rem); checkRemovedIndexes(rem, removedIndices.toNativeArray()); assertEquals(indices.length, rem.getRemoveCount()); } } }