}
}
}
private void setUpQuery() throws Exception {
QueryHandlerRegistry qrh =
control.createMock(QueryHandlerRegistry.class);
EasyMock.expect(bus.getExtension(QueryHandlerRegistry.class)).andReturn(qrh).anyTimes();
QueryHandler qh = control.createMock(QueryHandler.class);
List<QueryHandler> handlers = new ArrayList<QueryHandler>();
handlers.add(qh);
EasyMock.expect(qrh.getHandlers()).andReturn(handlers);
String base = ROOT + URI + "?" + QUERY;
EasyMock.expect(qh.isRecognizedQuery(EasyMock.eq(base),
EasyMock.eq(PATH),
EasyMock.same(endpoint))).andReturn(Boolean.TRUE);
EasyMock.expect(qh.getResponseContentType(EasyMock.eq(base),