@Test
public void testProcess_QueryInURI() throws Exception {
HttpHeaders headers = createNiceMock(HttpHeaders.class);
String uriString = "http://localhost.com:8080/api/v1/clusters/c1?foo=foo-value&bar=bar-value";
URI uri = new URI(URLEncoder.encode(uriString, "UTF-8"));
PredicateCompiler compiler = createStrictMock(PredicateCompiler.class);
Predicate predicate = createNiceMock(Predicate.class);
UriInfo uriInfo = createMock(UriInfo.class);
RequestHandler handler = createStrictMock(RequestHandler.class);
Result result = createMock(Result.class);
ResultStatus resultStatus = createMock(ResultStatus.class);
ResultPostProcessor processor = createStrictMock(ResultPostProcessor.class);
RequestBody body = createNiceMock(RequestBody.class);
Request request = getTestRequest(headers, body, uriInfo, compiler, handler, processor, null);
//expectations
expect(uriInfo.getRequestUri()).andReturn(uri).anyTimes();
expect(body.getQueryString()).andReturn(null);
expect(compiler.compile("foo=foo-value&bar=bar-value")).andReturn(predicate);
expect(handler.handleRequest(request)).andReturn(result);
expect(result.getStatus()).andReturn(resultStatus).anyTimes();
expect(resultStatus.isErrorState()).andReturn(false).anyTimes();
processor.process(result);