### Question:
ListNumbers { public static ListNumber toListNumber(Object primitiveArray) { if (primitiveArray instanceof byte[]) { return new ArrayByte((byte[]) primitiveArray); } else if (primitiveArray instanceof short[]) { return new ArrayShort((short[]) primitiveArray); } else if (primitiveArray instanceof int[]) { return new ArrayInt((int[]) primitiveArray); } else if (primitiveArray instanceof long[]) { return new ArrayLong((long[]) primitiveArray); } else if (primitiveArray instanceof float[]) { return new ArrayFloat((float[]) primitiveArray); } else if (primitiveArray instanceof double[]) { return new ArrayDouble((double[]) primitiveArray); } else { throw new IllegalArgumentException(primitiveArray + " is not a an array of primitive numbers"); } }  static SortedListView sortedView(ListNumber values); static SortedListView sortedView(ListNumber values, ListInt indexes); static int binarySearchValueOrLower(ListNumber values, double value); static int binarySearchValueOrHigher(ListNumber values, double value); static ListNumber linearListFromRange(final double minValue, final double maxValue, final int size); static ListNumber linearList(final double initialValue, final double increment, final int size); static boolean isLinear(ListNumber listNumber); static ListNumber toListNumber(Object primitiveArray); static ListNumber listView(ListNumber list, ListInt indexes);  }### Answer:
@Test public void toListNumber1() { byte[] array = new byte[]{1,2,3}; assertThat(ListNumbers.toListNumber(array), equalTo((ListNumber) new ArrayByte(array))); }
@Test public void toListNumber2() { short[] array = new short[]{1,2,3}; assertThat(ListNumbers.toListNumber(array), equalTo((ListNumber) new ArrayShort(array))); }
@Test public void toListNumber3() { int[] array = new int[]{1,2,3}; assertThat(ListNumbers.toListNumber(array), equalTo((ListNumber) new ArrayInt(array))); }
@Test public void toListNumber4() { long[] array = new long[]{1,2,3}; assertThat(ListNumbers.toListNumber(array), equalTo((ListNumber) new ArrayLong(array))); }
@Test public void toListNumber5() { float[] array = new float[]{1,2,3}; assertThat(ListNumbers.toListNumber(array), equalTo((ListNumber) new ArrayFloat(array))); }
@Test public void toListNumber6() { double[] array = new double[]{1,2,3}; assertThat(ListNumbers.toListNumber(array), equalTo((ListNumber) new ArrayDouble(array))); }