Code example for ServletWebRequest

0
		Method method = getClass().getMethod("params", int.class, String.class, String.class); 
		paramSystemProperty = new MethodParameter(method, 0); 
		paramContextPath = new MethodParameter(method, 1); 
		paramNotSupported = new MethodParameter(method, 2); 
 
		webRequest = new ServletWebRequest(new MockHttpServletRequest(), new MockHttpServletResponse()); 
 
		// Expose request to the current thread (for SpEL expressions) 
		RequestContextHolder.setRequestAttributes(webRequest); 
	} 
 
	@After 
	public void teardown() { 
		RequestContextHolder.resetRequestAttributes(); 
	} 
 
	@Test 
	public void supportsParameter() throws Exception { 
		assertTrue(resolver.supportsParameter(paramSystemProperty)); 
		assertTrue(resolver.supportsParameter(paramContextPath));