@Test public void testTraceLogLocale() { recorder.release(); recorder.capture("TRACE"); String value = LOCALE_CUSTOM.toString(); Cookie cookie = new Cookie(DEFAULT_COOKIE_NAME, value); when(request.getCookies()).thenReturn(new Cookie[]{cookie}); Locale locale = resolver.resolveLocale(request); List<Event> events = recorder.play(); assertThat(events).hasSize(1); Event event = events.get(0); assertThat(event.getLevel()).isEqualTo("TRACE"); assertThat(event.getMessage()).isEqualTo("Parsed cookie value [" + value + "] into locale '" + locale + "'"); assertThat(event.getThrown()).isNull(); }
@Override public Locale resolveLocale(HttpServletRequest request) { parseAngularCookieIfNecessary(request); return (Locale) request.getAttribute(LOCALE_REQUEST_ATTRIBUTE_NAME); }
AngularCookieLocaleResolver extends CookieLocaleResolver { @Override public Locale resolveLocale(HttpServletRequest request) { parseAngularCookieIfNecessary(request); return (Locale) request.getAttribute(LOCALE_REQUEST_ATTRIBUTE_NAME); } }
AngularCookieLocaleResolver extends CookieLocaleResolver { @Override public Locale resolveLocale(HttpServletRequest request) { parseAngularCookieIfNecessary(request); return (Locale) request.getAttribute(LOCALE_REQUEST_ATTRIBUTE_NAME); }  }
AngularCookieLocaleResolver extends CookieLocaleResolver { @Override public Locale resolveLocale(HttpServletRequest request) { parseAngularCookieIfNecessary(request); return (Locale) request.getAttribute(LOCALE_REQUEST_ATTRIBUTE_NAME); }  @Override Locale resolveLocale(HttpServletRequest request); @Override LocaleContext resolveLocaleContext(final HttpServletRequest request); @Override void addCookie(HttpServletResponse response, String cookieValue); }
AngularCookieLocaleResolver extends CookieLocaleResolver { @Override public Locale resolveLocale(HttpServletRequest request) { parseAngularCookieIfNecessary(request); return (Locale) request.getAttribute(LOCALE_REQUEST_ATTRIBUTE_NAME); }  @Override Locale resolveLocale(HttpServletRequest request); @Override LocaleContext resolveLocaleContext(final HttpServletRequest request); @Override void addCookie(HttpServletResponse response, String cookieValue); static final String QUOTE; }