@Test
public void createCompositeException_withMultipleInnerExceptions() {

  IOException inner1 = new IOException("inner exception 1");
  IOException inner2 = new IOException("inner exception 2");
  IOException compositeException = createCompositeException(ImmutableList.of(inner1, inner2));
  assertThat(inner1).isNotSameInstanceAs(compositeException);
  assertThat(inner2).isNotSameInstanceAs(compositeException);
  assertThat(compositeException).hasMessageThat().isEqualTo("Multiple IOExceptions.");
  assertThat(compositeException.getSuppressed()).isEqualTo(new Throwable[] {inner1, inner2});
  assertThat(compositeException.getSuppressed()[0]).isSameInstanceAs(inner1);
  assertThat(compositeException.getSuppressed()[1]).isSameInstanceAs(inner2);
}