@Test public void getCauses() { assertTrue(ExceptionUtil.getCauses(null).isEmpty()); List<Throwable> es = ExceptionUtil.getCauses(new IOException()); assertEquals(1, es.size()); Iterator<Throwable> i = es.iterator(); assertThat(i.next(), instanceOf(IOException.class)); es = ExceptionUtil.getCauses(getException()); assertEquals(3, es.size()); i = es.iterator(); assertThat(i.next(), instanceOf(IOException.class)); assertThat(i.next(), instanceOf(IllegalArgumentException.class)); assertThat(i.next(), instanceOf(IllegalStateException.class)); es = ExceptionUtil.getCauses(getException(), false); assertEquals(3, es.size()); i = es.iterator(); assertThat(i.next(), instanceOf(IOException.class)); assertThat(i.next(), instanceOf(IllegalArgumentException.class)); assertThat(i.next(), instanceOf(IllegalStateException.class)); }
public static List<Throwable> getCauses(Throwable throwable) { return getCauses(throwable, false); }
ExceptionUtil { public static List<Throwable> getCauses(Throwable throwable) { return getCauses(throwable, false); } }
ExceptionUtil { public static List<Throwable> getCauses(Throwable throwable) { return getCauses(throwable, false); }  }
ExceptionUtil { public static List<Throwable> getCauses(Throwable throwable) { return getCauses(throwable, false); }  static boolean causedBy(Throwable throwable, Class<? extends Throwable> causeType); static Throwable getRootCause(Throwable throwable); static List<Throwable> getCauses(Throwable throwable); static List<Throwable> getCauses(Throwable throwable, boolean reversed); static RuntimeException toRuntimeException(Exception exception); static RuntimeException toRuntimeException(Exception exception,
            Class<? extends RuntimeException> runtimeExceptionClass); static void throwExceptionOrError(Throwable throwable); static void throwRuntimeExceptionOrError(Throwable throwable); static String getStackTrace(Throwable throwable); }
ExceptionUtil { public static List<Throwable> getCauses(Throwable throwable) { return getCauses(throwable, false); }  static boolean causedBy(Throwable throwable, Class<? extends Throwable> causeType); static Throwable getRootCause(Throwable throwable); static List<Throwable> getCauses(Throwable throwable); static List<Throwable> getCauses(Throwable throwable, boolean reversed); static RuntimeException toRuntimeException(Exception exception); static RuntimeException toRuntimeException(Exception exception,
            Class<? extends RuntimeException> runtimeExceptionClass); static void throwExceptionOrError(Throwable throwable); static void throwRuntimeExceptionOrError(Throwable throwable); static String getStackTrace(Throwable throwable);  }