### Question:
Duration implements Cloneable, Serializable, Comparable<Duration>, JAXBable<JAXBDuration> { public int intValue() { BigDecimal mag = getMagnitude(); if (!isInIntRange(mag)) { throw new ArithmeticException("Magnitude [" + mag + "] is out of integer range."); } return mag.intValue(); } Duration(BigDecimal magnitude); protected  Duration(long unscaledMagnitude, int scale); static Duration create(ChronoUnit unit, BigDecimal magnitude); static Duration create(ChronoUnit unit, Duration from); static Duration create(ChronoUnit unit, long magnitude); static Duration create(ChronoUnit unit, long magnitude, int scale); static T create(Class<T> type, BigDecimal magnitude); @SuppressWarnings("unchecked") static T create(Class<T> type, Duration from); static T create(Class<T> type, long magnitude); static T create(Class<T> type, long magnitude, int scale); static Class<? extends Duration> fromChronoUnit(ChronoUnit unit); @SuppressWarnings("PMD.PreserveStackTrace") static Duration fromISO8601String(String input); static String getLongLabel(Class<? extends Duration> type, boolean plural); static String getSelectionLabel(Class<? extends Duration> type); static String getShortLabel(Class<? extends Duration> type, boolean plural); static String millisToPrettyString(long durationMs); static boolean containsDuration(Collection<? extends Duration> durations, Duration duration); Duration add(Duration other); abstract void addTo(Calendar cal); Date asDate(); @Override Duration clone(); @Override int compareTo(Duration o); Duration divide(BigDecimal d); Duration divide(double d); BigDecimal divide(Duration d); Duration divide(long d); double doubleValue(); @Override boolean equals(Object obj); boolean equalsIgnoreUnits(Duration other); abstract ChronoUnit getChronoUnit(); abstract String getLongLabel(boolean plural); BigDecimal getMagnitude(); abstract Class<? extends Duration> getReferenceUnits(); String getSelectionLabel(); abstract String getShortLabel(boolean plural); @Override JAXBDuration getWrapper(); @Override int hashCode(); abstract BigDecimal inReferenceUnits(); int intValue(); boolean isBetween(Duration min, Duration max); boolean isConvertibleTo(Class<? extends Duration> type); boolean isConvertibleTo(Duration other); boolean isGreaterThan(Duration o); boolean isInIntRange(); boolean isLessThan(Duration o); boolean isOne(); boolean isZero(); long longValue(); Duration multiply(BigDecimal d); Duration multiply(double d); Duration multiply(long d); Duration negate(); int signum(); Duration subtract(Duration other); String toISO8601String(); String toLongLabelString(); abstract String toPrettyString(); String toShortLabelString(); @Override String toString();  }### Answer:
@Test(expected = ArithmeticException.class) public void testIntValueOverflow() { new Seconds(BigDecimal.valueOf(Long.MAX_VALUE, 0)).intValue(); }