### Question:
ConfigurationRequest extends
        BaseRequest<ProviderConfiguration, AuthorizationException> { @WorkerThread @Override public ProviderConfiguration executeRequest(OktaHttpClient client) throws AuthorizationException { AuthorizationException exception = null; HttpResponse response = null; try { response = openConnection(client); JSONObject json = response.asJson(); ProviderConfiguration configuration = new Gson() .fromJson(json.toString(), ProviderConfiguration.class); configuration.validate(mIsOAuth2); return configuration; } catch (IOException ex) { exception = new AuthorizationException(ex.getMessage(), ex); } catch (JSONException ex) { exception = AuthorizationException.fromTemplate( AuthorizationException.GeneralErrors.JSON_DESERIALIZATION_ERROR, ex); } catch (IllegalArgumentException ex) { exception = AuthorizationException.fromTemplate( AuthorizationException.GeneralErrors.INVALID_DISCOVERY_DOCUMENT, ex); } catch (Exception e) { exception = new AuthorizationException(e.getMessage(), e); } finally { if (response != null) { response.disconnect(); } if (exception != null) { throw exception; } } return null; } ConfigurationRequest(HttpRequestBuilder.Configuration b); @WorkerThread @Override ProviderConfiguration executeRequest(OktaHttpClient client);  }### Answer:
@Test public void executeRequestSuccess() throws AuthorizationException { mEndPoint.enqueueConfigurationSuccess(); ProviderConfiguration configuration = mRequest.executeRequest(mHttpClient); ProviderConfiguration other = new Gson(). fromJson(JsonStrings.PROVIDER_CONFIG, ProviderConfiguration.class); assertNotNull(configuration); configuration.validate(false); assertEquals(configuration.persist(), other.persist()); mEndPoint.enqueueOAuth2ConfigurationSuccess(); ProviderConfiguration oauth2Result = mRequestOAuth2.executeRequest(mHttpClient); ProviderConfiguration oauth2Config = new Gson(). fromJson(JsonStrings.PROVIDER_CONFIG_OAUTH2, ProviderConfiguration.class); assertNotNull(oauth2Result); oauth2Config.validate(true); assertEquals(oauth2Result.persist(), oauth2Config.persist()); }
@Test public void executeRequestFailure() throws AuthorizationException { mExpectedEx.expect(AuthorizationException.class); mExpectedEx.expectMessage("Invalid status code 404 Client Error"); mEndPoint.enqueueConfigurationFailure(); mRequest.executeRequest(mHttpClient); }