AssertionOptionsProviderImpl implements AssertionOptionsProvider { public String getRpId() { return rpId; } AssertionOptionsProviderImpl(RpIdProvider rpIdProvider, WebAuthnAuthenticatorService authenticatorService, ChallengeRepository challengeRepository);  AssertionOptionsProviderImpl(WebAuthnAuthenticatorService authenticatorService, ChallengeRepository challengeRepository); PublicKeyCredentialRequestOptions getAssertionOptions(HttpServletRequest request, Authentication authentication); String getRpId(); void setRpId(String rpId); UserVerificationRequirement getAuthenticationUserVerification(); void setAuthenticationUserVerification(UserVerificationRequirement authenticationUserVerification); Long getAuthenticationTimeout(); void setAuthenticationTimeout(Long authenticationTimeout); AuthenticationExtensionsClientInputs<AuthenticationExtensionClientInput> getAuthenticationExtensions(); void setAuthenticationExtensions(AuthenticationExtensionsClientInputs<AuthenticationExtensionClientInput> authenticationExtensions); RpIdProvider getRpIdProvider(); void setRpIdProvider(RpIdProvider rpIdProvider); AuthenticationExtensionsClientInputsProvider<AuthenticationExtensionClientInput> getAuthenticationExtensionsProvider(); void setAuthenticationExtensionsProvider(AuthenticationExtensionsClientInputsProvider<AuthenticationExtensionClientInput> authenticationExtensionsProvider); WebAuthnAuthenticatorService getAuthenticatorService();  }
@Test public void getRpId_with_rpIdProvider(){ RpIdProvider rpIdProvider = (HttpServletRequest) -> "example.com"; WebAuthnAuthenticatorService authenticatorService = mock(WebAuthnAuthenticatorService.class); ChallengeRepository challengeRepository = mock(ChallengeRepository.class); AssertionOptionsProviderImpl optionsProvider = new AssertionOptionsProviderImpl(rpIdProvider, authenticatorService, challengeRepository); MockHttpServletRequest request = new MockHttpServletRequest(); assertThat(optionsProvider.getRpId(request)).isEqualTo("example.com"); }