authenticator = mock(Authenticator.class);
requestContextUtils = mock(RequestContextUtils.class);
localeResolver = mock(LocaleResolver.class, "en");
request = mock(HttpServletRequest.class);
response = mock(HttpServletResponse.class);
SecurityContextHolderFacade securityFacade = mock(SecurityContextHolderFacade.class);
SecurityContext securityContext = mock(SecurityContext.class);
when(securityFacade.getContext()).thenReturn(securityContext);
when(request.getHeader("X-FORWARDED-FOR")).thenReturn("192.168.1.1");
userController = new UserController(userService, authenticator, pluginService, userService);
}