### Question:
SyncSessionClientImpl implements SyncSessionClient { AuthorizedRequest createAuthorizedRequest(@NonNull Uri uri, @Nullable Map<String, String> properties, @Nullable Map<String, String> postParameters, @NonNull ConnectionParameters.RequestMethod method, ProviderConfiguration providerConfiguration, TokenResponse tokenResponse) throws AuthorizationException { return HttpRequestBuilder.newAuthorizedRequest() .config(mOidcConfig) .httpRequestMethod(method) .providerConfiguration(providerConfiguration) .tokenResponse(tokenResponse) .uri(uri) .properties(properties) .postParameters(postParameters) .createRequest(); } SyncSessionClientImpl(OIDCConfig oidcConfig, OktaState oktaState,
                          OktaHttpClient httpClient); JSONObject authorizedRequest(@NonNull Uri uri,
                                        @Nullable Map<String, String> properties,
                                        @Nullable Map<String, String> postParameters,
                                        @NonNull ConnectionParameters.RequestMethod method); @Override UserInfo getUserProfile(); @Override IntrospectInfo introspectToken(String token, String tokenType); @Override Boolean revokeToken(String token); @Override Tokens refreshToken(); @Override Tokens getTokens(); @Override boolean isAuthenticated(); @Override void clear(); @Override void cancel(); @Override void migrateTo(EncryptionManager manager);  }### Answer:
@Test public void authorizedRequestFailure() throws InterruptedException, AuthorizationException, OktaRepository.EncryptionException { mOktaState.save(mTokenResponse); mExpectedEx.expect(AuthorizationException.class); mEndPoint.enqueueReturnUnauthorizedRevoked(); Uri uri = Uri.parse(mProviderConfig.userinfo_endpoint); HashMap<String, String> properties = new HashMap<>(); properties.put("state", CUSTOM_STATE); AuthorizedRequest request = mSyncSessionClientImpl.createAuthorizedRequest(uri, properties, null, ConnectionParameters.RequestMethod.GET, mOktaState.getProviderConfiguration(), mTokenResponse); JSONObject result = request.executeRequest(mHttpClient); RecordedRequest recordedRequest = mEndPoint.takeRequest(); assertThat(recordedRequest.getHeader("state"), is(CUSTOM_STATE)); assertThat(recordedRequest.getHeader("Authorization"), is("Bearer " + ACCESS_TOKEN)); assertThat(recordedRequest.getHeader("Accept"), is(ConnectionParameters.JSON_CONTENT_TYPE)); assertThat(recordedRequest.getPath(), equalTo("/userinfo")); assertNull(result); }