diff --git a/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java b/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java index 02273d566..484215c41 100644 --- a/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java @@ -643,11 +643,6 @@ public class ExceptionUtilsTest extends AbstractLangTest { assertTrue(ExceptionUtils.isChecked(new TestThrowable())); } - @Test - public void testIsUnchecked_null() { - assertFalse(ExceptionUtils.isUnchecked(null)); - } - @Test public void testIsUnchecked_checked() { assertFalse(ExceptionUtils.isUnchecked(new IOException())); @@ -658,6 +653,11 @@ public class ExceptionUtilsTest extends AbstractLangTest { assertTrue(ExceptionUtils.isUnchecked(new StackOverflowError())); } + @Test + public void testIsUnchecked_null() { + assertFalse(ExceptionUtils.isUnchecked(null)); + } + @Test public void testIsUnchecked_unchecked() { assertTrue(ExceptionUtils.isUnchecked(new IllegalArgumentException())); @@ -728,6 +728,13 @@ public class ExceptionUtilsTest extends AbstractLangTest { assertThrows(NullPointerException.class, () -> ExceptionUtils.removeCommonFrames(null, null)); } + @Test + public void testRethrow() { + final Exception expected = new InterruptedException(); + final Exception actual = assertThrows(Exception.class, () -> ExceptionUtils.rethrow(expected)); + assertSame(expected, actual); + } + @Test public void testStream_jdkNoCause() { assertEquals(1, ExceptionUtils.stream(jdkNoCause).count()); @@ -772,13 +779,6 @@ public class ExceptionUtilsTest extends AbstractLangTest { assertSame(withoutCause, throwables.get(0)); } - @Test - public void testRethrow() { - final Exception expected = new InterruptedException(); - final Exception actual = assertThrows(Exception.class, () -> ExceptionUtils.rethrow(expected)); - assertSame(expected, actual); - } - @Test public void testThrowableOf_ThrowableClass() { assertNull(ExceptionUtils.throwableOfThrowable(null, null));