### Question:
PluginHttpSessionWrapper implements HttpSession { public Object getAttribute(final String name) { ClassLoader classLoader = ClassLoaderStack.pop(); try { if (log.isDebugEnabled()) { log.debug("getAttribute('" + name + "') Popping ClassLoader: " + classLoader + " .New ContextClassLoader: " + Thread.currentThread().getContextClassLoader()); } return delegate.getAttribute(name); } finally { ClassLoaderStack.push(classLoader); } } PluginHttpSessionWrapper(final HttpSession session); Object getAttribute(final String name); void setAttribute(final String name, final Object value); Object getValue(final String name); void putValue(final String name, final Object value); long getCreationTime(); String getId(); long getLastAccessedTime(); ServletContext getServletContext(); void setMaxInactiveInterval(final int interval); int getMaxInactiveInterval(); @SuppressWarnings({"deprecation"}) javax.servlet.http.HttpSessionContext getSessionContext(); Enumeration getAttributeNames(); @SuppressWarnings({"deprecation"}) String[] getValueNames(); void removeAttribute(final String name); @SuppressWarnings({"deprecation"}) void removeValue(final String name); void invalidate(); boolean isNew();  }### Answer:
@Test public void testGetAttribute() throws Exception { MockSession mockSession = new MockSession(Thread.currentThread().getContextClassLoader()); PluginHttpSessionWrapper sessionWrapper = new PluginHttpSessionWrapper(mockSession); sessionWrapper.getAttribute("foo"); ClassLoader pluginClassLoader = new ClassLoader() { }; ClassLoaderStack.push(pluginClassLoader); try { sessionWrapper.getAttribute("foo"); assertSame(pluginClassLoader, Thread.currentThread().getContextClassLoader()); } finally { ClassLoaderStack.pop(); } }