ArraysParser { public static <T> Object parseArrayAsPrimitiveArray(Class<T[]> arrayTypeClass, String input) throws IllegalArgumentException { T[] array = parseArray(arrayTypeClass, input); return AttributeUtils.getPrimitiveArray(array); }  static T[] parseArray(Class<T[]> arrayTypeClass, String input); static Object parseArrayAsPrimitiveArray(Class<T[]> arrayTypeClass, String input);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void testParseNullPrimitiveNotAllowed() { ArraysParser.parseArrayAsPrimitiveArray(Integer[].class, "[1, null]"); }