### Question:
CollectionNumbers { public static long[] longArrayWrappedOrCopy(CollectionNumber coll) { long[] array = wrappedLongArray(coll); if (array != null) { return array; } return longArrayCopyOf(coll); } private  CollectionNumbers(); static Object wrappedArray(CollectionNumber coll); static float[] wrappedFloatArray(CollectionNumber coll); static double[] wrappedDoubleArray(CollectionNumber coll); static byte[] wrappedByteArray(CollectionNumber coll); static short[] wrappedShortArray(CollectionNumber coll); static int[] wrappedIntArray(CollectionNumber coll); static long[] wrappedLongArray(CollectionNumber coll); static float[] floatArrayCopyOf(CollectionNumber coll); static double[] doubleArrayCopyOf(CollectionNumber coll); static byte[] byteArrayCopyOf(CollectionNumber coll); static short[] shortArrayCopyOf(CollectionNumber coll); static int[] intArrayCopyOf(CollectionNumber coll); static long[] longArrayCopyOf(CollectionNumber coll); static float[] floatArrayWrappedOrCopy(CollectionNumber coll); static double[] doubleArrayWrappedOrCopy(CollectionNumber coll); static byte[] byteArrayWrappedOrCopy(CollectionNumber coll); static short[] shortArrayWrappedOrCopy(CollectionNumber coll); static int[] intArrayWrappedOrCopy(CollectionNumber coll); static long[] longArrayWrappedOrCopy(CollectionNumber coll);  }### Answer:
@Test public void longArrayWrappedOrCopy1(){ long[] array = new long[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; ListNumber coll = new ArrayLong(array); long[] array2 = CollectionNumbers.longArrayWrappedOrCopy(coll); assertThat(array2, equalTo(new long[] {0,1,2,3,4,5,6,7,8,9})); assertThat(array2, sameInstance(array)); }
@Test public void longArrayWrappedOrCopy2(){ int[] array = new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; ListNumber coll = new ArrayInt(array); long[] array2 = CollectionNumbers.longArrayWrappedOrCopy(coll); assertThat(array2, equalTo(new long[] {0,1,2,3,4,5,6,7,8,9})); }