anchor.diff:      // ... constructor
   
       public AuthnRequest convert(Saml2AuthenticationRequestContext context) {
  +        MySaml2AuthenticationRequestContext myContext = (MySaml2AuthenticationRequestContext) context;
           Issuer issuer = issuerBuilder.buildObject();
  -        issuer.setValue(context.getIssuer());
  +        issuer.setValue(myContext.getIssuer());
   
           AuthnRequest authnRequest = authnRequestBuilder.buildObject();
           authnRequest.setIssuer(issuer);
  -        authnRequest.setDestination(context.getDestination());
  -        authnRequest.setAssertionConsumerServiceURL(context.getAssertionConsumerServiceUrl());
  +        authnRequest.setDestination(myContext.getDestination());
  +        authnRequest.setAssertionConsumerServiceURL(myContext.getAssertionConsumerServiceUrl());
   
           // ... additional settings
   
  -        authRequest.setForceAuthn(context.getForceAuthn());
  +        authRequest.setForceAuthn(myContext.getForceAuthn());
           return authnRequest;
       }
   }
  
positive.code: ----
  @Bean
  open fun authenticationRequestContextResolver(): Saml2AuthenticationRequestContextResolver {
      val resolver = DefaultSaml2AuthenticationRequestContextResolver(relyingPartyRegistrationResolver)
      return Saml2AuthenticationRequestContextResolver { request ->
          resolver.resolve(request)
      }
  }
  
  
negative.code:     private val issuerBuilder: IssuerBuilder? = null
  
      // ... constructor
      override fun convert(context: Saml2AuthenticationRequestContext): AuthnRequest {
          val myContext: MySaml2AuthenticationRequestContext = context
          val issuer: Issuer = issuerBuilder.buildObject()
          issuer.value = myContext.getIssuer()
          val authnRequest: AuthnRequest = authnRequestBuilder.buildObject()
          authnRequest.issuer = issuer
          authnRequest.destination = myContext.getDestination()
          authnRequest.assertionConsumerServiceURL = myContext.getAssertionConsumerServiceUrl()
  
          // ... additional settings
          authRequest.setForceAuthn(myContext.getForceAuthn())
          return authnRequest
      }
  }
  