assertEquals(OAuth2Error.INVALID_REQUEST.getCode(), params.get("error"));
assertEquals(OAuth2Error.INVALID_REQUEST.getDescription(), params.get("error_description"));
assertEquals(state.toString(), params.get("state"));
assertEquals(3, params.size());
HTTPResponse httpResponse = r.toHTTPResponse();
assertEquals(HTTPResponse.SC_FOUND, httpResponse.getStatusCode());
assertEquals(location, httpResponse.getLocation());
r = AuthorizationErrorResponse.parse(httpResponse);
assertEquals(REDIRECT_URI, r.getRedirectionURI());
assertEquals(OAuth2Error.INVALID_REQUEST, r.getErrorObject());