@Test public void testGetLocalizationWithServletRequest() throws Exception { ServletRequest servletRequest = mock(ServletRequest.class); when(servletRequest.getAttribute(ATTRIBUTE_NAME)).thenReturn(localization); Localization result = LocalizationContextUtils.getLocalization(servletRequest); assertThat(result).isNotNull().isEqualTo(localization); }
public static Localization getLocalization(ServletRequest servletRequest) { return (Localization) servletRequest.getAttribute(ATTRIBUTE_NAME); }
LocalizationContextUtils { public static Localization getLocalization(ServletRequest servletRequest) { return (Localization) servletRequest.getAttribute(ATTRIBUTE_NAME); } }
LocalizationContextUtils { public static Localization getLocalization(ServletRequest servletRequest) { return (Localization) servletRequest.getAttribute(ATTRIBUTE_NAME); } private  LocalizationContextUtils(); }
LocalizationContextUtils { public static Localization getLocalization(ServletRequest servletRequest) { return (Localization) servletRequest.getAttribute(ATTRIBUTE_NAME); } private  LocalizationContextUtils(); static void setLocalization(ServletRequest servletRequest, Localization localization); static Localization getLocalization(ServletRequest servletRequest); static void setLocalization(ServletContext servletContext, Localization localization); static Localization getLocalization(ServletContext servletContext); }
LocalizationContextUtils { public static Localization getLocalization(ServletRequest servletRequest) { return (Localization) servletRequest.getAttribute(ATTRIBUTE_NAME); } private  LocalizationContextUtils(); static void setLocalization(ServletRequest servletRequest, Localization localization); static Localization getLocalization(ServletRequest servletRequest); static void setLocalization(ServletContext servletContext, Localization localization); static Localization getLocalization(ServletContext servletContext);  }