@Test
public void aggregateAuthenticationFailuresWitNestedDittoRuntimeException() {

    final DittoRuntimeException expectedException =
            DittoRuntimeException.newBuilder("test:my.error", HttpStatusCode.UNAUTHORIZED)
                    .description("foo")
                    .build();
    final IllegalStateException reasonOfFailure = new IllegalStateException("Not a DRE", expectedException);
    final List<AuthenticationResult> authenticationResults =
            Collections.singletonList(DefaultAuthenticationResult.failed(KNOWN_DITTO_HEADERS, reasonOfFailure));
    final DittoRuntimeException dittoRuntimeException =
            underTest.aggregateAuthenticationFailures(authenticationResults);
    assertThat(dittoRuntimeException).isEqualTo(expectedException);
}