### Question:
OpenIDConnectClientImpl implements OpenIDConnectClient { public TokenSet getTokens(String authCode, String redirectUri) { if (log.isInfoEnabled()) log.info("Requesting tokens for client "+clientId+" and redirect to "+redirectUri); if (log.isDebugEnabled()) log.debug("Using authorization code " + authCode); if (authCode == null || authCode.trim().isEmpty()) throw new IllegalArgumentException("authCode must not be null or empty"); URLUtil.validateUrlParameter("RedirectURI", redirectUri); authCode = authCode.trim(); List<NameValuePair> params = new ArrayList<NameValuePair>(); params.add(new BasicNameValuePair("grant_type", "authorization_code")); params.add(new BasicNameValuePair("client_id", clientId)); params.add(new BasicNameValuePair("redirect_uri", redirectUri)); params.add(new BasicNameValuePair("code", authCode)); return getTokenSetInner(params); } OpenIDConnectClientImpl(
			final String authorizeUrl,
			final String tokenUrl,
			final String clientId,
			final String clientSecret,
			final LoginFormAdapter loginFormAdapter); @Override URI getAuthorizeURI(String redirectUri); @Override URI getAuthorizeURI(String redirectUri, String scope); @Override String authorize(String username, String password, String redirectUri); @Override String authorize(String username, String password, String redirectUri, String scope); TokenSet getTokens(String authCode, String redirectUri); TokenSet refreshTokens(String refreshToken); static final String DEFAULT_SCOPE; }### Answer:
@Test public void testGetTokensNullAuthCode() { thrown.expect(IllegalArgumentException.class); client.getTokens(null, "http: }
@Test public void testGetTokensEmptyAuthCode() { thrown.expect(IllegalArgumentException.class); client.getTokens(" ", "http: }
@Test public void testGetTokensInvalidRedirectUrl() { thrown.expect(IllegalArgumentException.class); client.getTokens("somecode", "something here"); }