newParams.put(key, params.get(key).toString());
}
RestController controller = injector.getInstance(RestController.class);
try {
RestRequest restRequest = new MockRestRequest(path, newParams, method, null);
HttpServer.setHttpHolder(new HttpHolder(restRequest, response));
controller.dispatchRequest(restRequest, response);
} catch (Exception e) {
catchRenderFinish(e);
}