@Test
public void testThrowOverflowException() {

  final Object[][] testParameters =
      new Object[][] {{Byte.MIN_VALUE - 1, Byte.class}, {Byte.MAX_VALUE + 1, Byte.class},
          {Short.MIN_VALUE - 1, Short.class}, {Short.MAX_VALUE + 1, Short.class},
          {-2147483649L, Integer.class}, {2147483648L, Integer.class}};
  for (final Object[] testParameter : testParameters) {
    Number number = (Number) testParameter[0];
    Class<?> targetClass = (Class<?>) testParameter[1];
    try {
      NumberUtils.convert(number, targetClass);
    } catch (Exception e) {
      assertSame(IllegalArgumentException.class, e.getClass());
    }
  }
}