### Question:
ArrayUtil { public static <T> boolean containsValue(final T value, final T[] array) { return Arrays.stream(array).anyMatch(o -> Objects.equals(o, value)); } private  ArrayUtil(); static int getNullIndex(final T[] array); static boolean containsValue(final T value, final T[] array);  }### Answer:
@Test public void shouldCheckArrayItemsCorrectly() { Double[] doubles = new Double[]{10.0, null, null}; Long[] longs = new Long[]{10L, 35L, 70L, null}; Integer[] integers = new Integer[]{10, 35, 70, null}; String[] strings = new String[]{"Hello", "hi", "bye", null}; Assert.assertTrue(ArrayUtil.containsValue(10.0, doubles)); Assert.assertTrue(ArrayUtil.containsValue(35L, longs)); Assert.assertTrue(ArrayUtil.containsValue(70, integers)); Assert.assertTrue(ArrayUtil.containsValue("hi", strings)); }
@Test public void shouldCheckArrayItemsCorrectly() { final Double[] doubles = new Double[]{10.0, null, null}; final Long[] longs = new Long[]{10L, 35L, 70L, null}; final Integer[] integers = new Integer[]{10, 35, 70, null}; final String[] strings = new String[]{"Hello", "hi", "bye", null}; assertTrue(ArrayUtil.containsValue(10.0, doubles)); assertTrue(ArrayUtil.containsValue(35L, longs)); assertTrue(ArrayUtil.containsValue(70, integers)); assertTrue(ArrayUtil.containsValue("hi", strings)); }