Code example for ServletWebRequest

0
		Method method = this.getClass().getDeclaredMethod("handle", UriComponentsBuilder.class, ServletUriComponentsBuilder.class, int.class); 
		this.builderParam = new MethodParameter(method, 0); 
		this.servletBuilderParam = new MethodParameter(method, 1); 
		this.intParam = new MethodParameter(method, 2); 
		this.servletRequest = new MockHttpServletRequest(); 
		this.webRequest = new ServletWebRequest(this.servletRequest); 
	} 
 
	@Test 
	public void supportsParameter() throws Exception { 
		assertTrue(this.resolver.supportsParameter(this.builderParam)); 
		assertTrue(this.resolver.supportsParameter(this.servletBuilderParam)); 
		assertFalse(this.resolver.supportsParameter(this.intParam)); 
	} 
 
	@Test 
	public void resolveArgument() throws Exception { 
		this.servletRequest.setContextPath("/myapp"); 
		this.servletRequest.setServletPath("/main"); 
		this.servletRequest.setPathInfo("/accounts");