// test2 scenario: admin can check other user's script
// has parameter "ownerId", and current user is Admin, resolved user is "TEST2_USER"
ServletWebRequest webRequest2 = mock(ServletWebRequest.class);
when(webRequest2.getParameter("ownerId")).thenReturn("TEST2_USER");
User adminUser = new User("tmpAdminId", "tmpAdminId", "tmpAdminPwd", "admin@nhn.com", Role.ADMIN);
MockUserContext adminUserContext = mock(MockUserContext.class);
when(adminUserContext.getCurrentUser()).thenReturn(adminUser);
resolver.setUserContext(adminUserContext);
Object resolveArgument2 = resolver.resolveArgument(parameter, null, webRequest2, null);
assertThat(((User) resolveArgument2).getUserId(), is("TEST2_USER"));
// test3 scenario: general user switch to use other's permission