public void testObjectLargeArrayArraycopy()
    {
        Double[] data = new Double[]{1.12345, -1.54321, 100., -100., Double.MAX_VALUE, Double.MIN_VALUE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, Double.NaN, Double.MIN_NORMAL};
        int startPos = 2;
        int length = 8;
        LargeArray.setMaxSizeOf32bitArray(1073741824);
        ObjectLargeArray a = new ObjectLargeArray(data);
        ObjectLargeArray b = new ObjectLargeArray(2 * data.length, 84);
        Utilities.arraycopy(a, startPos, b, 0, length);
        for (int i = 0; i < length; i++) {
            assertEquals(data[startPos + i], b.get(i));
        }
        b = new ObjectLargeArray(2 * data.length, 84);
        Utilities.arraycopy(data, startPos, b, 0, length);
        for (int i = 0; i < length; i++) {
            assertEquals(data[startPos + i], b.get(i));
        }
        LargeArray.setMaxSizeOf32bitArray(data.length - 1);
        a = new ObjectLargeArray(data);
        b = new ObjectLargeArray(2 * data.length, 84);
        Utilities.arraycopy(a, startPos, b, 0, length);
        for (int i = 0; i < length; i++) {
            assertEquals(data[startPos + i], b.get(i));
        }
        b = new ObjectLargeArray(2 * data.length, 84);
        Utilities.arraycopy(data, startPos, b, 0, length);
        for (int i = 0; i < length; i++) {
            assertEquals(data[startPos + i], b.get(i));
        }
    }