UriInfo uriInfo = createMock(UriInfo.class);
String uriString = "http://localhost.com:8080/api/v1/clusters/c1";
URI uri = new URI(URLEncoder.encode(uriString, "UTF-8"));
PredicateCompiler compiler = createStrictMock(PredicateCompiler.class);
RequestBody body = createNiceMock(RequestBody.class);
Exception exception = new InvalidQueryException("test");
Request request = getTestRequest(null, body, uriInfo, compiler, null, null, null);
//expectations
expect(uriInfo.getRequestUri()).andReturn(uri).anyTimes();