### Question:
NativeAuthorizeRequest extends BaseRequest<AuthorizeResponse, AuthorizationException> { @Override public AuthorizeResponse executeRequest(OktaHttpClient client) throws AuthorizationException { AuthorizationException exception = null; HttpResponse response = null; try { response = openConnection(client); if (response.getStatusCode() == HttpURLConnection.HTTP_UNAUTHORIZED) { exception = AuthorizationException.TokenRequestErrors.INVALID_CLIENT; } else if (response.getStatusCode() == HttpURLConnection.HTTP_OK || response.getStatusCode() == HttpURLConnection.HTTP_MOVED_TEMP) { Uri locationUri = Uri.parse(response.getHeaderField("Location")); return AuthorizeResponse.fromUri(locationUri); } } catch (IOException ex) { exception = new AuthorizationException(ex.getMessage(), ex); } catch (Exception e) { exception = new AuthorizationException(e.getMessage(), e); } finally { if (response != null) { response.disconnect(); } if (exception != null) { throw exception; } } return null; } NativeAuthorizeRequest(Parameters parameters); Parameters getParameters(); @Override AuthorizeResponse executeRequest(OktaHttpClient client);  }### Answer:
@Test public void executeRequestSuccess() throws AuthorizationException { mEndPoint.enqueueNativeRequestSuccess(CUSTOM_STATE); AuthorizeResponse result = mRequest.executeRequest(mHttpClient); assertNotNull(result); assertNotNull(result.getCode(), EXCHANGE_CODE); }
@Test public void executeRequestFailure() throws AuthorizationException { mExpectedEx.expect(AuthorizationException.class); mEndPoint.enqueueReturnUnauthorizedRevoked(); mRequest.executeRequest(mHttpClient); }