Code example for HttpRequestBase

Methods: getURI

0
 
        private void mockGetUri(HttpRequestBase httpRequestBase, String absoluteUrl)
        { 
            try 
            { 
                when(httpRequestBase.getURI()).thenReturn(new URI(absoluteUrl));
            } 
            catch (URISyntaxException e)
            { 
                fail(e.getMessage());
            } 
        } 
    } 
 
    private Map<String, String> getQueryParams()
    { 
        Map<String, String> queryParams = new HashMap<String, String>();
        queryParams.put(StackUri.QueryParams.PAGE, "1");
        queryParams.put(StackUri.QueryParams.CLIENT_ID, QueryParamDefaultValues.CLIENT_ID);
        return queryParams;
    }