@Test public void shouldChangeLocale() { when(RequestContextUtils.getLocale(request)).thenReturn(Locale.getDefault()); homeController.changeLocale(request); verify(messageService).setCurrentLocale(Locale.getDefault()); }
@RequestMapping(value = "/changeLocale", method = PUT, headers = ACCEPT_JSON) public void changeLocale(HttpServletRequest request) { messageService.setCurrentLocale(RequestContextUtils.getLocale(request)); }
HomeController extends BaseController { @RequestMapping(value = "/changeLocale", method = PUT, headers = ACCEPT_JSON) public void changeLocale(HttpServletRequest request) { messageService.setCurrentLocale(RequestContextUtils.getLocale(request)); } }
HomeController extends BaseController { @RequestMapping(value = "/changeLocale", method = PUT, headers = ACCEPT_JSON) public void changeLocale(HttpServletRequest request) { messageService.setCurrentLocale(RequestContextUtils.getLocale(request)); }  }
HomeController extends BaseController { @RequestMapping(value = "/changeLocale", method = PUT, headers = ACCEPT_JSON) public void changeLocale(HttpServletRequest request) { messageService.setCurrentLocale(RequestContextUtils.getLocale(request)); }  @RequestMapping(value = "", method = GET) String homeDefault(); @RequestMapping(value = "/locales", method = GET) ResponseEntity<OpenLmisResponse> getLocales(HttpServletRequest request); @RequestMapping(value = "/changeLocale", method = PUT, headers = ACCEPT_JSON) void changeLocale(HttpServletRequest request); }
HomeController extends BaseController { @RequestMapping(value = "/changeLocale", method = PUT, headers = ACCEPT_JSON) public void changeLocale(HttpServletRequest request) { messageService.setCurrentLocale(RequestContextUtils.getLocale(request)); }  @RequestMapping(value = "", method = GET) String homeDefault(); @RequestMapping(value = "/locales", method = GET) ResponseEntity<OpenLmisResponse> getLocales(HttpServletRequest request); @RequestMapping(value = "/changeLocale", method = PUT, headers = ACCEPT_JSON) void changeLocale(HttpServletRequest request);  }