private Message mockMessage(String baseAddress, String pathInfo, String query,
List<ClassResourceInfo> cris) {
Message m = new MessageImpl();
Exchange e = new ExchangeImpl();
e.put(Service.class, new JAXRSServiceImpl(cris));
Endpoint endpoint = control.createMock(Endpoint.class);
e.put(Endpoint.class, endpoint);
m.setExchange(e);
control.reset();
ServletDestination d = control.createMock(ServletDestination.class);