private String getSortedAndEncodedParams(OAuthRequest request) {
HttpParameters params = new HttpParametersImpl();
params.addAll(request.getQueryStringParams());
params.addAll(request.getBodyParams());
params.addAll(new HttpParametersImpl(request.getOauthParameters()));
return params.asOauthBaseString();
}
private void checkPreconditions(OAuthRequest request) {
Preconditions.checkNotNull(request, "Cannot extract base string from null object");