### Question:
HttpRequestBuilder { public static Authorized newAuthorizedRequest() { return new Authorized().requestType(AUTHORIZED); }  static Authorized newAuthorizedRequest(); static Configuration newConfigurationRequest(); static TokenExchange newTokenRequest(); static RevokeToken newRevokeTokenRequest(); static Profile newProfileRequest(); static RefreshToken newRefreshTokenRequest(); static Introspect newIntrospectRequest();  }### Answer:
@Test public void createWithNoConfigRequest() throws AuthorizationException { mExpectedEx.expect(AuthorizationException.class); mExpectedEx.expectMessage("Invalid config"); HttpRequestBuilder.newAuthorizedRequest().createRequest(); }
@Test public void createInvalidAuthorizedRequest() throws AuthorizationException { ProviderConfiguration configuration = TestValues.getProviderConfiguration(CUSTOM_URL); mExpectedEx.expect(AuthorizationException.class); mExpectedEx.expectMessage("Not logged in or invalid uri"); HttpRequestBuilder.newAuthorizedRequest() .providerConfiguration(configuration) .httpRequestMethod(ConnectionParameters.RequestMethod.GET) .config(mConfig) .createRequest(); }
@Test public void createAuthorizedRequest() throws AuthorizationException { AuthorizedRequest request = HttpRequestBuilder.newAuthorizedRequest() .providerConfiguration(mConfiguration) .tokenResponse(mTokenResponse) .httpRequestMethod(ConnectionParameters.RequestMethod.GET) .uri(Uri.parse(CUSTOM_URL)) .config(mConfig) .createRequest(); assertNotNull(request); assertTrue(request.toString().contains(RequestType.AUTHORIZED.toString())); }
@Test public void config() { HttpRequestBuilder.Authorized builder = HttpRequestBuilder.newAuthorizedRequest() .config(mConfig); assertNotNull(builder.mConfig); }
@Test public void postParameters() { HttpRequestBuilder.Authorized builder = HttpRequestBuilder.newAuthorizedRequest() .postParameters(Collections.EMPTY_MAP); assertNotNull(builder.mPostParameters); }
@Test public void properties() { HttpRequestBuilder.Authorized builder = HttpRequestBuilder.newAuthorizedRequest() .properties(Collections.EMPTY_MAP); assertNotNull(builder.mProperties); }
@Test public void uri() { HttpRequestBuilder.Authorized builder = HttpRequestBuilder.newAuthorizedRequest() .uri(Uri.parse(CUSTOM_URL)); assertNotNull(builder.mUri); }
@Test public void httpRequestMethod() { HttpRequestBuilder.Authorized builder = HttpRequestBuilder.newAuthorizedRequest() .httpRequestMethod(ConnectionParameters.RequestMethod.GET); assertNotNull(builder.mRequestMethod); }