public void testURIBuilding()
throws JSONException, SenseiException, UnsupportedEncodingException, URISyntaxException, MalformedURLException
{
SenseiRequest aRequest = createNonRandomSenseiRequest();
List<NameValuePair> queryParams = HttpRestSenseiServiceImpl.convertRequestToQueryParams(aRequest);
HttpRestSenseiServiceImpl senseiService = createSenseiService();
URI requestURI = senseiService.buildRequestURI(queryParams);
assertTrue(requestURI.toURL().toString().length() > 0); // force resolving the URI to a string
List<NameValuePair> parsedParams = URLEncodedUtils.parse(requestURI, "UTF-8");
MockServletRequest mockServletRequest = MockServletRequest.create(parsedParams);