@@ -0,0 +1,1734 @@
+package org.ngrinder.infra.spring;%0A%0Aimport static org.hamcrest.Matchers.is;%0Aimport static org.junit.Assert.assertThat;%0Aimport static org.mockito.Mockito.mock;%0Aimport static org.mockito.Mockito.when;%0A%0Aimport org.junit.Test;%0Aimport org.mockito.invocation.InvocationOnMock;%0Aimport org.mockito.stubbing.Answer;%0Aimport org.ngrinder.AbstractNGrinderTransactionalTest;%0Aimport org.ngrinder.model.User;%0Aimport org.ngrinder.user.service.MockUserContext;%0Aimport org.ngrinder.user.service.UserContext;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.core.MethodParameter;%0Aimport org.springframework.web.context.request.NativeWebRequest;%0Aimport org.springframework.web.context.request.WebRequest;%0A%0Apublic class UserHandlerMethodArgumentResolverTest extends AbstractNGrinderTransactionalTest %7B%0A%0A%09private UserHandlerMethodArgumentResolver resolver;%0A%0A%09@Autowired%0A%09private MockUserContext mockUserContext;%0A%0A%09@Test%0A%09public void testUserHandlerMethodArgument() throws Exception %7B%0A%09%09resolver = new UserHandlerMethodArgumentResolver();%0A%09%09MethodParameter parameter = mock(MethodParameter.class);%0A%09%09final Class%3C?%3E class1 = User.class;%0A%09%09when(parameter.getParameterType()).thenAnswer(new Answer%3CClass%3C?%3E%3E() %7B%0A%09%09%09@Override%0A%09%09%09public Class%3C?%3E answer(InvocationOnMock invocation) throws Throwable %7B%0A%09%09%09%09return class1;%0A%09%09%09%7D%0A%09%09%7D);%0A%09%09assertThat(resolver.supportsParameter(parameter), is(true));%0A%09%09NativeWebRequest webRequest = mock(NativeWebRequest.class);%0A%09%09when(webRequest.getParameter(%22ownerId%22)).thenReturn(%22admin%22);%0A%09%09resolver.setUserContext(mockUserContext);%0A%09%09Object resolveArgument = resolver.resolveArgument(parameter, null, webRequest, null);%0A%09%09assertThat(((User)resolveArgument).getUserId(), is(%22admin%22));%0A%09%7D%0A%7D%0A

Fix test failure