@Test
public void getAuthorizationContextFromFailedInstanceOfError() {

    final AssertionError assertionError = new AssertionError("This is a test.");
    final AuthenticationResult underTest = DefaultAuthenticationResult.failed(dittoHeaders, assertionError);
    assertThatExceptionOfType(IllegalStateException.class)
            .isThrownBy(underTest::getAuthorizationContext)
            .withCause(assertionError);
}