@Test public void setAuthorizedClientRepositoryWhenAuthorizedClientRepositoryIsNullThenThrowIllegalArgumentException() { assertThatThrownBy(() -> this.authorizedClientRepository.setAnonymousAuthorizedClientRepository(null)) .isInstanceOf(IllegalArgumentException.class); }
@Before public void setup() { this.authorizedClientService = mock(ReactiveOAuth2AuthorizedClientService.class); this.anonymousAuthorizedClientRepository = mock( ServerOAuth2AuthorizedClientRepository.class); this.authorizedClientRepository = new AuthenticatedPrincipalServerOAuth2AuthorizedClientRepository(this.authorizedClientService); this.authorizedClientRepository.setAnonymousAuthorizedClientRepository(this.anonymousAuthorizedClientRepository); }