@Test public void testWithASingleException() { CompositeException ce = new CompositeException(IAE); assertThat(ce.getCauses()).hasSize(1); assertThat(ce.getCause()).isEqualTo(IAE); assertThat(ce.getSuppressed()).isEmpty(); }
public List<Throwable> getCauses() { List<Throwable> causes = new ArrayList<>(); causes.add(getCause()); causes.addAll(Arrays.asList(getSuppressed())); return causes; }
CompositeException extends RuntimeException { public List<Throwable> getCauses() { List<Throwable> causes = new ArrayList<>(); causes.add(getCause()); causes.addAll(Arrays.asList(getSuppressed())); return causes; } }
CompositeException extends RuntimeException { public List<Throwable> getCauses() { List<Throwable> causes = new ArrayList<>(); causes.add(getCause()); causes.addAll(Arrays.asList(getSuppressed())); return causes; } CompositeException(List<Throwable> causes);  CompositeException(Throwable... causes);  CompositeException(CompositeException other, Throwable toBeAppended); }
CompositeException extends RuntimeException { public List<Throwable> getCauses() { List<Throwable> causes = new ArrayList<>(); causes.add(getCause()); causes.addAll(Arrays.asList(getSuppressed())); return causes; } CompositeException(List<Throwable> causes);  CompositeException(Throwable... causes);  CompositeException(CompositeException other, Throwable toBeAppended); @Override String getMessage(); List<Throwable> getCauses(); }
CompositeException extends RuntimeException { public List<Throwable> getCauses() { List<Throwable> causes = new ArrayList<>(); causes.add(getCause()); causes.addAll(Arrays.asList(getSuppressed())); return causes; } CompositeException(List<Throwable> causes);  CompositeException(Throwable... causes);  CompositeException(CompositeException other, Throwable toBeAppended); @Override String getMessage(); List<Throwable> getCauses();  }