OcelotContext { public HttpSession getHttpSession() { return (HttpSession) ThreadLocalContextHolder.get(Constants.HTTPSESSION); }  HttpSession getHttpSession(); Locale getLocale(); void setLocale(Locale locale); boolean isUserInRole(String role); Principal getPrincipal();  }
@Test public void testGetHttpSession() { System.out.println("getHttpSession"); HttpSession session = mock(HttpSession.class); ThreadLocalContextHolder.cleanupThread(); HttpSession result = instance.getHttpSession(); assertThat(result).isNull(); ThreadLocalContextHolder.put(Constants.HTTPSESSION, session); result = instance.getHttpSession(); assertThat(result).isEqualTo(session); }