Code example for ServletWebRequest

0
	 
	@Test 
	public void resolveArgument_dauthorizationRequest_object() throws Exception { 
		MockHttpServletRequest httpServletRequest = new MockHttpServletRequest(); 
		httpServletRequest.setParameter("signed_request", DEAUTH_CALLBACK); 
		NativeWebRequest request = new ServletWebRequest(httpServletRequest);  
		Method method = SignedRequestArgumentResolverTest.class.getDeclaredMethod("annotatedMethod", DeauthorizationRequest.class, Map.class, MultiValueMap.class, String.class); 
		MethodParameter deauthParameter = new MethodParameter(method, 0); 
		DeauthorizationRequest resolved = (DeauthorizationRequest) resolver.resolveArgument(deauthParameter, null, request, null); 
		assertEquals("HMAC-SHA256", resolved.getAlgorithm()); 
		assertEquals(1335894796, resolved.getIssuedAt()); 
		assertEquals("738140579", resolved.getUserId()); 
		assertEquals("us", resolved.getUser().getCountry()); 
		assertEquals("en_US", resolved.getUser().getLocale()); 
	} 
	 
	@Test 
	@SuppressWarnings({ "unused", "unchecked" }) 
	public void resolveArgument_dauthorizationRequest_map() throws Exception { 
		MockHttpServletRequest httpServletRequest = new MockHttpServletRequest();