### Question:
MultiArray { public static <O> MultiArray<O> wrap(final O elements, final int[] dimensions) { return wrap(elements, 0, dimensions); } protected  MultiArray(final T elements, final int[] dimensions, final int offset); static MultiArray<O> wrap(final O elements, final int[] dimensions); @SuppressWarnings("unchecked") static MultiArray<O> wrap(final O elements, final int offset, final int[] dimensions); static MultiArray<O> wrap(final O elements); @SuppressWarnings("unchecked") static MultiArray<O> wrap(final O elements, final int offset); int[] getDimensions(); int getOffset(); int getElementsCount(); int getIndex(final int[] indices); int[] getIndices(final int index); T elements(); @Override String toString();  }### Answer:
@Test void testMultiArrayDoubleExceptions() { assertThrows(IllegalArgumentException.class, () -> MultiArray.wrap("Foo", 0, new int[] { 1, 2, 3 })); assertThrows(IllegalArgumentException.class, () -> MultiArray.wrap("Foo", 0)); assertThrows(IllegalArgumentException.class, () -> MultiArray.wrap(new double[] { 3, 2 }, 0, new int[] { 1, 2, 3 })); }
@Test void testMultiArrayFloatExceptions() { assertThrows(IllegalArgumentException.class, () -> MultiArray.wrap("Foo", 0, new int[] { 1, 2, 3 })); assertThrows(IllegalArgumentException.class, () -> MultiArray.wrap("Foo", 0)); assertThrows(IllegalArgumentException.class, () -> MultiArray.wrap(new float[] { 3, 2 }, 0, new int[] { 1, 2, 3 })); }
@Test void testMultiArrayLongExceptions() { assertThrows(IllegalArgumentException.class, () -> MultiArray.wrap("Foo", 0, new int[] { 1, 2, 3 })); assertThrows(IllegalArgumentException.class, () -> MultiArray.wrap("Foo", 0)); assertThrows(IllegalArgumentException.class, () -> MultiArray.wrap(new long[] { 3, 2 }, 0, new int[] { 1, 2, 3 })); }
@Test void testMultiArrayObjectExceptions() { assertThrows(IllegalArgumentException.class, () -> MultiArray.wrap("Foo", 0, new int[] { 1, 2, 3 })); assertThrows(IllegalArgumentException.class, () -> MultiArray.wrap("Foo", 0)); assertThrows(IllegalArgumentException.class, () -> MultiArray.wrap(new String[] { "a", "b" }, 0, new int[] { 1, 2, 3 })); }