ori.setHttpMethod("GET");
HttpServletRequest request = EasyMock.createMock(HttpServletRequest.class);
HttpServletResponse response = new HttpServletResponseFilter(
EasyMock.createMock(HttpServletResponse.class), null);
ServletContext context = EasyMock.createMock(ServletContext.class);
ServletConfig config = EasyMock.createMock(ServletConfig.class);
EasyMock.replay(request);
EasyMock.replay(context);
EasyMock.replay(config);
Message m = new MessageImpl();
m.put(AbstractHTTPDestination.HTTP_REQUEST, request);
m.put(AbstractHTTPDestination.HTTP_RESPONSE, response);
m.put(AbstractHTTPDestination.HTTP_CONTEXT, context);
m.put(AbstractHTTPDestination.HTTP_CONFIG, config);
List<Object> params =
JAXRSUtils.processParameters(ori, new MetadataMap<String, String>(), m);
assertEquals("4 parameters expected", 4, params.size());
assertSame(request.getClass(), params.get(0).getClass());
assertSame(response.getClass(), params.get(1).getClass());
assertSame(context.getClass(), params.get(2).getClass());
assertSame(config.getClass(), params.get(3).getClass());
}