Code example for ServletWebRequest

0
 * @author Oliver Gierke 
 */ 
class TestUtils { 
 
	public static NativeWebRequest getWebRequest() { 
		return new ServletWebRequest(new MockHttpServletRequest()); 
	} 
 
	public static MethodParameter getParameterOfMethod(Class<?> controller, String name, Class<?>... argumentTypes) { 
 
		Method method = getMethod(controller, name, argumentTypes); 
		return new MethodParameter(method, 0); 
	} 
 
	public static Method getMethod(Class<?> controller, String name, Class<?>... argumentTypes) { 
 
		try { 
			return controller.getMethod(name, argumentTypes); 
		} catch (Exception e) { 
			throw new RuntimeException(e);