@Test public void constructorWhenAccessTokenResponseClientIsNullThenThrowIllegalArgumentException() { assertThatThrownBy(() -> new OAuth2AuthorizationCodeAuthenticationProvider(null)) .isInstanceOf(IllegalArgumentException.class); }
@Before @SuppressWarnings("unchecked") public void setUp() { this.clientRegistration = clientRegistration().build(); this.authorizationRequest = request().build(); this.accessTokenResponseClient = mock(OAuth2AccessTokenResponseClient.class); this.authenticationProvider = new OAuth2AuthorizationCodeAuthenticationProvider(this.accessTokenResponseClient); }