Code example for ServletWebRequest

0
		paramSystemProperty = new MethodParameter(method, 2); 
		paramContextPath = new MethodParameter(method, 3); 
		paramNamedValueMap = new MethodParameter(method, 4); 
 
		servletRequest = new MockHttpServletRequest(); 
		webRequest = new ServletWebRequest(servletRequest, new MockHttpServletResponse()); 
 
		// Expose request to the current thread (for SpEL expressions) 
		RequestContextHolder.setRequestAttributes(webRequest); 
	} 
 
	@After 
	public void teardown() { 
		RequestContextHolder.resetRequestAttributes(); 
	} 
 
	@Test 
	public void supportsParameter() { 
		assertTrue("String parameter not supported", resolver.supportsParameter(paramNamedDefaultValueStringHeader)); 
		assertTrue("String array parameter not supported", resolver.supportsParameter(paramNamedValueStringArray));