* Base tests for service requests.
*/
public abstract class BaseRequestTest {
public void testGetQueryPredicate(String uriString) throws Exception {
PredicateCompiler compiler = createStrictMock(PredicateCompiler.class);
Predicate p = createMock(Predicate.class);
UriInfo uriInfo = createMock(UriInfo.class);
URI uri = new URI(URLEncoder.encode(uriString, "UTF-8"));
expect(uriInfo.getRequestUri()).andReturn(uri);
expect(compiler.compile(uriString.substring(uriString.indexOf("?") + 1))).andReturn(p);
replay(uriInfo, compiler, p);
Request request = getTestRequest(null, null, uriInfo, compiler);