LocaleController { @GetMapping("current") public DomainLocale current(@Nullable Locale requestLocale) { Locale locale = Optional.ofNullable(requestLocale).orElse(Locale.ROOT); return localeService.toDomainLocale(localeService.toSupported(locale), locale); }  @GetMapping("current") DomainLocale current(@Nullable Locale requestLocale); @GetMapping("{id}") DomainLocale findOne(@PathVariable("id") String name,
            @RequestParam(value = "support", required = false, defaultValue = "false") boolean support); @GetMapping List<DomainLocale> findAll(); @GetMapping(params = "all") List<DomainLocale> supported(@RequestParam("all") boolean all);  }
@Test public void testCurrent() throws Exception { log.info("current"); Locale locale = Locale.getDefault(); MvcResult result = mvc.perform(get("/api/locales/current.json") .locale(locale)) .andExpect(status().isOk()) .andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON)) .andReturn(); }