### Question:
ArrayInteger extends Array<Integer> { @Override public Integer get(int... index) { return storage.get(indexFn.get(index)); } ArrayInteger(DataType dtype, int[] shape);  ArrayInteger(DataType dtype, int[] shape, Storage<Integer> storage); private  ArrayInteger(DataType dtype, IndexFn indexFn, Storage<Integer> storageD); @Override Iterator<Integer> fastIterator(); @Override Iterator<Integer> iterator(); @Override Integer get(int... index); @Override Integer get(Index index);  }### Answer:
@Test public void testFactoryCopy() { int[] shape1 = new int[] {1, 2, 3}; Array<Integer> array1 = Arrays.factory(DataType.INT, shape1, new int[] {1, 2, 3, 4, 5, 6}); Array<Integer> array2 = Arrays.factory(DataType.INT, shape1, new int[] {7, 8, 9, 10, 11, 12}); int[] shape = new int[] {2, 2, 3}; Array<Integer> array = Arrays.factoryCopy(DataType.INT, shape, ImmutableList.of(array1, array2)); assertThat(array.get(0, 0, 0)).isEqualTo(1); assertThat(array.get(0, 0, 1)).isEqualTo(2); assertThat(array.get(0, 0, 2)).isEqualTo(3); assertThat(array.get(0, 1, 0)).isEqualTo(4); assertThat(array.get(0, 1, 1)).isEqualTo(5); assertThat(array.get(0, 1, 2)).isEqualTo(6); assertThat(array.get(1, 0, 0)).isEqualTo(7); assertThat(array.get(1, 0, 1)).isEqualTo(8); assertThat(array.get(1, 0, 2)).isEqualTo(9); assertThat(array.get(1, 1, 0)).isEqualTo(10); assertThat(array.get(1, 1, 1)).isEqualTo(11); assertThat(array.get(1, 1, 2)).isEqualTo(12); int count = 0; for (int val : array) { assertThat(val).isEqualTo(count + 1); count++; } }
@Test public void testMisc() { int[] shape1 = new int[] {1, 2, 3}; Array<Integer> array = Arrays.factory(DataType.INT, shape1); Index index = array.getIndex(); assertThat(array.get(index.set(0, 1, 2))).isEqualTo(0); }